Managing connections with Network Manager

While we just went through the trouble of manually configuring our network interfaces, it's not always the case that this is desirable. End user workstations, for example, would benefit from Network Manager handling this job for us. For laptops and their wireless interfaces, Network Manager does the job better than most of us would.

Network Manager is usually installed by default in most distributions of Linux. For Debian, it is typically installed whenever you opt for a graphical desktop environment. If you opted for a shell-only install (you unchecked the options for a desktop environment during installation), you probably don't have it installed. To be sure, execute the following command (works on both Debian and CentOS):

ps ax |grep NetworkManager

If you see that Network Manager is running, then it is installed. But to be double-sure, you can execute this command in Debian:

aptitude search network-manager

If Network Manager is installed, you'll see it listed as follows (there will be an i designation to the left of it):

In CentOS, you can check whether Network Manager is installed or not using the following command:

yum list installed |grep NetworkManager

If you're running a desktop environment, you may have an implementation of Network Manager running within your system tray. If so, feel free to manage your connection via the available GUI tools. Depending on which desktop environment you're using, the instructions for doing so will be different. In this section, we discuss a more universal approach to utilizing Network Manager to configure connections. This method is to use the following command:

nmtui

The nmtui command allows you to configure Network Manager within a shell environment, but with GUI-like controls.

Managing connections with Network Manager

Configuring a system's network connection via nmtui

If we click on Edit a connection, we will see a list of interfaces available on our machine:

Managing connections with Network Manager

nmtui interface selection

When we select an interface, we'll first see some basic information.

Managing connections with Network Manager

First screen of editing a connection in nmtui

To edit the IP address for this interface, press the down arrow key to select <AUTOMATIC> on the left-hand side of IPv4 CONFIGURATION and press Enter. Then, press the right arrow key to select the <Show> option and expand the remaining fields.

Managing connections with Network Manager

Editing a connection with nmtui

To edit an item, press the down arrow key to the <Add...> option next to the field. It will expand a textbox to allow you to edit the item.

Managing connections with Network Manager

Editing a connection with nmtui

When finished, scroll all the way down and press Enter on <OK> to save your changes. There you have it; you should be able to manage your connections via Network Manager, should you choose to do so.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset