
Photo by Anukrati Omar on Unsplash
What's New in NetworkManager
The Right Settings
The vast majority of Linux distributions use NetworkManager [1] as the standard tool for configuring the network stack. Even though the systemd-networkd
daemon [2] has been a popular alternative for some time, many administrators still appreciate the flexibility that NetworkManager offers. The tool is especially convenient when you use a laptop and switch between different wireless local-area networks (WLANs). Besides a graphical tool that includes an applet for the desktop, you also can configure the service from the shell. This feature also lets you automate the entire network environment setup in the server environment.
ifcfg Files
NetworkManager has always been configured with interface configuration (ifcfg) files. The files contain simple instructions for configuring a network device or more complex profiles for specific network connections. For most Linux distributions, these files are located in the /etc/sysconfig/network-scripts/
or /etc/network/interfaces
directory. Ultimately, the plugin you use decides which files NetworkManager accesses – but more about that later. If you are unsure, you can discover the path to the configuration files with the command:
nmcli -f TYPE,FILENAME,NAME conn TYPE wifi FILENAME /etc/sysconfig/network-scripts/ifcfg-GrandHotel_Guest NAME GrandHotel_Guest
A trivial example that configures an Ethernet card named enp0s31f6 as a DHCP client would be:
TYPE=Ethernet DEVICE=enp0s31f6 BOOTPROTO=dhcp
Listing 1 shows a complete profile for a WLAN connection set up for a network interface card named wlp0s20f3 . The individual configuration options can be found in the
...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.
