How to use ifdown and ifup commands to Restart Network on Ubuntu 20.04 In Linux
Step 1: Install ifupdown Package
Use the below command to install the ifupdown package in the Ubuntu as it doesn’t come by default with Ubuntu
sudo apt install ifupdown -y
Step 2: Bring down the network interfaces using ifdown
Now, by using the below command, we will bring down all the network interfaces using ifdown. Execute the below command in the terminal.
sudo ifdown -a
Step 3: Bring up the network interface using ifup
After bringing down the interfaces, we can bring it back up using the ifup command. Execute the below command to bring up the network interfaces using ifup.
sudo ifup -a
How to Restart Network on Ubuntu 20.04
In Linux, the Network is the backbone that enables communication between devices and the internet. Restarting the network on Ubuntu 20.04 is crucial for troubleshooting network issues or applying new configurations. This process involves refreshing network services and interfaces to ensure smooth connectivity. There are multiple methods to achieve this, including using systemctl to restart networking.service, using ifdown and ifup commands to bring down and bring up specific network interfaces, or utilizing nmcli to restart its service. Each method offers flexibility based on the user’s requirements and network setup.