How to enable and disable network interfaces in Manjaro
The Linux-based machines provide strong command line support to configure the networks. In this section, we will explain the usage of several commands that can be used to enable/disable network interfaces in Manjaro Linux.
Let’s start with getting the information of network interfaces. We have executed the IP command in this regard.
How to use the ifconfig command to enable and disable a network interface in Manjaro
Before getting into depth, first, check the availability of the ifconfig command. The ifconfig command may not work on your Manjaro, because Manjaro does not offer ifconfig by default. To access it, you have to install net tools and the below-mentioned command assists in this regard.
The ifconfig command in Manjaro can be used to change the status of any network interface. To use this command, the syntax is provided below.
Syntax
For instance, the below-mentioned command will disable the interface named enp0s3.
To verify the changes, the status of enp0s3 is checked with the help of the following command.
Moreover, to enable the same network interface, you can use ifconfig in the following way,
The status can be verified by using the below-mentioned command.
How to use the ip command to enable and disable a network interface in Manjaro
The ip command in Linux-based distros can also be used to enable or disable any network interface. To do so, you must follow the syntax provided below.
Syntax
For example, we have disabled enp0s3 by using the below-mentioned command.
Verify the status with the help of the following command.
To set the status back to enable, the following command is executed.
After that, you can get the status by issuing the following command.
How to use nmcli command to enable and disable a network interface in Manjaro
The nmcli command is a powerful command-line utility that can be used to edit, activate/deactivate the network connections. Moreover, it is also used to change the status of network interfaces as well.
Syntax
The name-of-connection refers to the name of the wired connection of your Manjaro Linux. For instance, in our case, the name is “Wired connection 1“.
For instance, the following use of nmcli will disable “Wired connection 1“.
You can verify the status of the connections by issuing the following command.
To enable it again, the command written below is executed.
Check the status with the help of the following command.
How to use nmtui tool to enable/disable a network interface in Manjaro
The nmtui is a command-line graphical interface of network configuration and it can also be used to enable/disable the network interfaces.
So, to launch this tool, simply execute the following command from your Mnajaro’s terminal.
After that, you will find the interface shown below. Navigate to “Activate a connection” using arrow keys and then move to “OK” using tab key and hit enter.
Now, choose “Wired connection 1” and move towards “Deactivate” to disable that interface.
Once the network is disabled successfully, you will observe an “Activate” option. Moreover, choose “Activate” to turn the status back to active state.
How to use systemctl command to enable/disable interface in Manjaro Linux
The systemctl command in Manjaro is exercised to enable/disable several services including the network interfaces as well. The usage of systemsctl command is very easy to manipulate the status of interfaces.
Firstly, check the current state of network interfaces. The network service is enabled and active.
It is to notice that, before disabling the services, you have to first stop it by issuing the following command.
Now, disable the network services with the help of the command written below.
It is recommended to check the status of NetworkManager;
Similarly, you are directed to start the service before enabling it. To do so, use systemctl command as provided below.
And now you can enable the network service by issuing the following command.
After enabling, check the status with the help of the command written below.
Conclusion
Network interfaces play a vital role in keeping the smooth functioning of the network connections. For instance, if any change occurs in the network settings, the network interface acts up and resultantly the network also stops functioning. In this article, you have learned how to enable or disable the network interfaces in Manjaro Linux. There is a list of commands supported by Manjaro that can be used to change the status of any interface individually or you can enable/disable all the interfaces at once. A typical Linux user or a network administrator can get help from this guide to manage network interfaces in Manjaro.