Enable or disable a network interface with ip link set

Toggle a NIC's administrative state using iproute2 syntax instead of the deprecated ifconfig up/down.

LinuxifconfiginterfacenicMedium risk
Run `sudo ip link set eth0 down` to disable the interface and `sudo ip link set eth0 up` to re-enable it.

01Command

Command
$ sudo ip link set eth0 down && sudo ip link set eth0 up

02What it does

ifconfig is legacy and absent from modern minimal installs; `ip link set DEV up|down` is the supported way to flip an interface's administrative state. Note this only raises the link — if you also need addressing, follow with `ip addr add` or let NetworkManager/DHCP take over. The combination `sudo ip link set eth0 down && sudo ip link set eth0 up` is the classic fix for a NIC stuck in a weird state after a driver hiccup.

03Risk

RiskMedium risk
Requirementsroot privileges; iproute2
!Warning: If you're SSH'd in through the interface you're toggling, you will cut your own session off — use a console, out-of-band access, or an `at`/`nohup` job that brings it back up automatically.

04Undo

Undo
$ sudo ip link set eth0 up

05Sources

Last verified: 2026-09-17 · Category: Network

06Related solutions