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.
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 up02What 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
!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 up05Sources
- ip-link(8) — network device configurationEvidence: Documents `ip link set DEV { up | down }` to change interface operational state.
Last verified: 2026-09-17 · Category: Network