I have a server running Debian that has been connected to WiFi for a long time, but I have since moved it and given it a wired connection. It still seems to be using WiFi though, and in my router settings it shows up as connected through WiFi and not through ethernet.

Now I want to make sure that I can switch over from WiFi to ethernet directly from an ssh-connection so I won’t have to connect a screen to get direct access.

What is my best bet here? A lot of the tools I find used for different network operations are not pre-installed, and I don’t want to be installing just everything being suggested. Can I solve this by installing network-manager and using nmcli?

EDIT: I also want to disable the wireless card.

EDIT2: No eth-interface shows up when running ip link show, EDIT3: but r8169 0000:02:00.0 enp2s0: renamed from eth0 shows up in dmesg and enp2s0 shows up in ip link show, so I guess it is recongized then.

[SOLVED] EDIT4: I made the modifications manually in etc/network/interfaces, and now it seems to work. I entered the following lines:

auto enp2s0
iface enp2s0 inet dhcp

And then it showed up in my router. I then continued to comment out the lines enabling the wireless interface, and after reboot it works fine still.

  • cyberwolfie@lemmy.mlOP
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    ‘ip a’ to show your active addresses

    Nice, now only my ethernet interface shows an IP after implementing the changes to etc/network/interfaces as described in an edit in the OP.

    rfkill to hard disable wireless devices

    rfkill was also not isntalled by default on my server, but I’ve installed it now and see that they (i.e. bluetooth and wifi) are unblocked, so I will now go learn how to block them. :)

    nmtui if you want a simple way to change network configuration or disable something

    Nice, I will check this out!