
Lead Image © godrick, 123RF.com
NetworkManager at the command line
Building Bridges
NetworkManager should be familiar to most readers, because many of today's Linux distributions use it to configure the network. One reason for changing from legacy init scripts to a system such as NetworkManager is the more complex boot process where many actions run in parallel thanks to the use of systemd. The old init scripts are not geared for this, which could cause problems in some setups. NetworkManager eliminates these problems.
Applet for the Desktop
The tool usually takes the form of an applet on the desktop that gives you access to WiFi networks in addition to configuring wired networks. When the user clicks on the applet, the available wireless networks are shown alongside the existing network devices. All settings for access to networks can be configured via the applet. Plugins also let you set up mobile or InfiniBand connections, and even VPNs, via this approach. For access to devices in the immediate vicinity, the tool can also configure Bluetooth devices and set up corresponding connections. The same also applies to the usage of virtual adapters, such as VLANs, bridges, or bonding and teaming devices.
The use of applets is probably out of the question for server operations and even for power users. But, there are two tools for the command line: nmtui and nmcli. The former offers a simple text interface for rudimentary service configuration tasks, whereas the latter is a comprehensive tool that can be used to configure all service functions. Alternatively, there is a D-Bus API [1] for addressing the services in your own applications.
Objects as a Basis
In this article, I will look at the nmcli command-line tool, because it is likely to be used by most admins for configuring the NetworkManager service. To use the tool properly, it is important to
...Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
