Restarting a network interface in Linux helps recover from transient connectivity problems, apply new IP settings, or test changes to routing and firewall rules without rebooting the system. Bringing an interface down and back up clears its link state and usually triggers a fresh negotiation with switches, access points, or DHCP servers.

Under the hood, the kernel exposes logical network interfaces such as enp0s3, eth0, or wlp2s0, and the iproute2 tools manage their link state and addresses. Commands like ip link set and ip addr interact directly with the kernel’s networking stack, while higher-level services such as NetworkManager or legacy scripts in /etc/network may monitor and reconfigure interfaces in response to these changes.

Restarting an in-use interface can immediately drop active SSH sessions or break connectivity to remote services, so changes are safest from a local console, out-of-band management, or a secondary interface. On systems using NetworkManager, additional tools like nmcli may also adjust connections when an interface is toggled, and some environments apply firewall or VLAN policies as soon as the link returns.

Steps to restart a network interface:

  1. Open a terminal with privileges that can run sudo.
    $ whoami
    user
  2. List all network interfaces and their current state.
    $ ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 02:00:00:00:00:10 brd ff:ff:ff:ff:ff:ff
        inet 192.0.2.40/24 metric 100 brd 192.0.2.255 scope global dynamic eth0
           valid_lft 1766sec preferred_lft 1766sec
    ##### snipped #####

    The interface name appears at the start of each block, for example eth0 or wlp2s0.

  3. Choose the interface that needs to be restarted based on its name and current state.

    Common wired names include enp0s3 or eth0, while wireless interfaces often appear as wlp2s0 or wlan0.

  4. Bring the selected interface down using ip link set.
    $ sudo ip link set dev eth0 down

    Bringing down the interface that carries an active SSH session immediately disconnects that session and may require physical or out-of-band access to recover.

  5. Confirm that the interface is now marked as DOWN in the link state.
    $ ip link show dev eth0
    2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,DOWN> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
        link/ether 02:00:00:00:00:10 brd ff:ff:ff:ff:ff:ff
  6. Bring the interface back up so it can negotiate link and request addresses again.
    $ sudo ip link set dev eth0 up

    No output from ip link set usually indicates success; any error message points to permission or naming issues.

  7. Check that the interface has returned to the UP state.
    $ ip link show dev eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
        link/ether 02:00:00:00:00:10 brd ff:ff:ff:ff:ff:ff
  8. Renew the DHCP lease if the interface uses dynamic addressing and needs a fresh IP configuration.
    $ sudo dhclient eth0
    DHCPREQUEST for 192.0.2.40 on eth0 to 255.255.255.255 port 67
    DHCPOFFER of 192.0.2.40 from 192.0.2.1
    DHCPACK of 192.0.2.40 from 192.0.2.1
    bound to 192.0.2.40 -- renewal in 1800 seconds.

    Some distributions use other DHCP clients such as systemd-networkd or NetworkManager, which may renew leases automatically when the interface comes back up.

  9. Verify the final IP address and configuration on the restarted interface.
    $ ip addr show dev eth0
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 02:00:00:00:00:10 brd ff:ff:ff:ff:ff:ff
        inet 192.0.2.40/24 metric 100 brd 192.0.2.255 scope global dynamic eth0
           valid_lft 1800sec preferred_lft 1800sec
  10. Test basic connectivity from the host to confirm successful restart of the interface.
    $ ping -c 4 203.0.113.50
    PING 203.0.113.50 (203.0.113.50) 56(84) bytes of data.
    64 bytes from 203.0.113.50: icmp_seq=1 ttl=128 time=5.01 ms
    64 bytes from 203.0.113.50: icmp_seq=2 ttl=128 time=13.9 ms
    64 bytes from 203.0.113.50: icmp_seq=3 ttl=128 time=8.70 ms
    64 bytes from 203.0.113.50: icmp_seq=4 ttl=128 time=5.32 ms
    
    --- 203.0.113.50 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3014ms
    rtt min/avg/max/mdev = 5.011/8.241/13.941/3.594 ms