In this tutorial, we will explore how to reset a network interface in Linux. Resetting a network interface can help resolve network issues, apply new settings, or refresh the network connection. This process involves bringing the interface down and back up, reloading drivers, and flushing configurations if necessary.
In this tutorial you will learn:
- How to restart a network interface
- How to reset a network interface by reloading drivers and flushing configurations

| Category | Requirements, Conventions or Software Version Used |
|---|---|
| System | Any Linux distribution |
| Software | None specific |
| Other | Access to the terminal and root privileges |
| Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Resetting a Network Interface in Linux
Resetting a network interface in Linux can involve different steps depending on the extent of the reset needed. Below, we will go through restarting the interface, reloading the network driver, and flushing IP addresses and routes.
- Restarting the Network Interface: Restarting the interface can often resolve minor network issues and apply new configurations.
# ifdown && ifup <interface_name>
Replace
<interface_name>with the name of your network interface (e.g.,eth0,wlan0). This command will bring the interface down and then back up, effectively restarting it. - Using the ip command: Another method to restart the network interface using the
ipcommand.# ip link set down <interface_name> # ip link set up <interface_name>
This sequence of commands first brings the network interface down and then brings it back up, similar to the
ifdownandifupcommands. - Restarting Network Services: If you are using
NetworkManagerorsystemd-networkd, you can restart the network service to reset all network interfaces.# systemctl restart NetworkManager
or
# systemctl restart systemd-networkd
This will restart the network service, which in turn restarts all network interfaces managed by the service.
- Reloading the Network Driver: For a more thorough reset, you can reload the network driver associated with your network interface.
# lshw -C network | grep driver

Identify the driver of you network card Identify the driver associated with your interface, then unload and reload it:
# modprobe -r <driver_name> # modprobe <driver_name>
Replace
<driver_name>with the name of your network driver. This process unloads the driver and then reloads it, which can help resolve deeper issues. - Flushing IP Addresses and Routes: In some cases, you may need to clear the current IP addresses and routes configured for the interface.
# ip addr flush dev <interface_name> # ip route flush dev <interface_name>
This will remove all IP addresses and routes associated with the specified interface, effectively resetting its network configuration.
Conclusion
Resetting a network interface in Linux can help resolve a variety of network-related issues and apply new settings. Whether you are restarting the interface, reloading drivers, or flushing configurations, the steps outlined in this tutorial provide a comprehensive guide to managing network interfaces in Linux.
