This write-up will demonstrate the installation of the network manager then in detail we will discuss the nmcli command for what purpose and how it can be used.
What is the installation procedure of Network Manager
Though the nmcli is installed by default in Ubuntu but in case if it is not installed we will install the network manager package. For the installation of the network manager we will first update our Ubuntu repository by opening the terminal and entering the following command for updating:
Now we will install the network manager by using the following command.
As it can be seen that the network manager is already installed. To start the network manager use:
To confirm the above step we will check out the status of the network manager by using systemctl command as:
What is nmcli
Sometimes we are managing the network setting by using the GUI (graphical user interface) but suddenly because of some issues the GUI crashes so we think about the other options to accomplish our results. An alternative to the GUI we have is command line methods. For the command line method we have the βnmcliβ through which we can configure the network settings. There are different features which we can do by using this command. We will discuss them briefly.
nmcli command for General functions : Command nmcli can be used for the general functions like to check the status of wired connections for this purpose we used command as:
We can also check the hostname by using this command:
We can also check the permissions which are granted by the network manager as
Nmcli command for the radio transmission control : We can check the status of the wifi whether it is on or off by the following command:
Nmcli command for monitoring : We can monitor the changes in different aspects like in connectivity state, devices using the nmcli command as:
If there some modifications made in the backend of network settings it will display them.
nmcli command for network management : We can manage the network setting using the nmcli command. In Ubuntu the configurations with the wireless devices are considered as connections.
We can display all the connections as:
We can also check the status of device by using the nmcli command:
For more functions of nmcli command we can type man nmcli and the brief list will be available on Ubuntu:
Conclusion
The nmcli is the tool of the network manager mostly it is present in Ubuntu but in rare cases if it is not present then no need to panic we can still have it by installing the network manager package. In this write-up, we discussed the nmcli command and its functions briefly. Using the nmcli command we can check out the statuses of the wireless connections. We can also take a look at all the commands of nmcli by opening its manual through the βmanβ command. I Expect this writeup will make you understand the use of nmcli command.