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: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 08:00:27:12:34:56 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.50/24 brd 192.168.1.255 scope global dynamic enp0s3
           valid_lft 85732sec preferred_lft 85732sec
    3: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 9c:b6:d0:ab:cd:ef brd ff:ff:ff:ff:ff:ff
    ##### snipped #####

    The interface name appears at the start of each block, for example enp0s3 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 enp0s3 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 enp0s3
    2: enp0s3: <NO-CARRIER,BROADCAST,MULTICAST,DOWN> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
        link/ether 08:00:27:12:34:56 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 enp0s3 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 enp0s3
    2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
        link/ether 08:00:27:12:34:56 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 enp0s3
    DHCPREQUEST for 192.168.1.50 on enp0s3 to 255.255.255.255 port 67
    DHCPOFFER of 192.168.1.60 from 192.168.1.1
    DHCPACK of 192.168.1.60 from 192.168.1.1
    bound to 192.168.1.60 -- renewal in 40604 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 enp0s3
    2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 08:00:27:12:34:56 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.60/24 brd 192.168.1.255 scope global dynamic enp0s3
           valid_lft 86361sec preferred_lft 86361sec
  10. Test basic connectivity from the host to confirm successful restart of the interface.
    $ ping -c 4 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=14.2 ms
    64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=14.0 ms
    64 bytes from 8.8.8.8: icmp_seq=3 ttl=115 time=13.9 ms
    64 bytes from 8.8.8.8: icmp_seq=4 ttl=115 time=14.1 ms
    
    --- 8.8.8.8 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3004ms
    rtt min/avg/max/mdev = 13.900/14.050/14.200/0.120 ms
Discuss the article:

Comment anonymously. Login not required.