Fedora

How to Enable and Disable the Network Interface on Fedora Linux

Managing the network interface is essential for various reasons including troubleshooting, security, testing, power management, and network configuration changes. You can disable and re-enable the network interface to troubleshoot the connectivity issues. This approach allows the administrators to control the network connectivity and fulfill the various system and operational requirements.

However, disabling the network interface in Fedora Linux requires the correct understanding. Otherwise, you may lose the internet connectivity of the system. So, if you also want to learn how to disable the network interface and then re-enable it, this tutorial is for you. Here, we will explain the multiple methods to enable and disable the network interface on Fedora Linux.

How to Enable and Disable the Network Interface on Fedora Linux

Let’s take a look at the commands that you can run on your system to disable its network interface and then enable it with no hassles.

The Ifconfig or Ip Command

You can either go for the ifconfig or ip command to disable a network interface but you need to know the name of your network for it. Hence, run the following command:

ifconfig

Now, run any of the following commands to disable the network interface. For example, let’s disable the “enp0s3” network:

sudo ifconfig enp0s3 down

Or

sudo ip link set enp0s3 down

Similarly, run the following command to re-enable a network interface:

sudo ifconfig enp0s3 up

Or

sudo ip link set enp0s3 up

The Systemctl Command

You can permanently turn the network interface on and off through the “systemctl” command. So, run any of the following commands to disable the network interface:

sudo systemctl stop NetworkManager-wait-online.service

Or

sudo systemctl disable NetworkManager-wait-online.service

You can then execute the following command to re-enable a network interface:

sudo systemctl start NetworkManager-wait-online.service

Or

sudo systemctl enable NetworkManager-wait-online.service

Conclusion

In this tutorial, we covered the various commands that you can use to enable and disable the network interfaces on Fedora Linux. These step-by-step instructions cater to novice and experienced users which ensure that you can efficiently manage your network connections. By following these methods, you have greater control over your Fedora Linux network interfaces which helps you maintain a stable and reliable network environment.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.