How to easily change a network connection on a minimal installation of CentOS 7


Jack Wallen shows you how to easily modify and add a new network connection on a minimal CentOS 7 installation.

CentOS 7 is a very powerful server platform. With this open-source, enterprise-ready Linux distribution, the sky’s the limit of what you can do. You can install it with a GUI to make things easier, but it takes system resources. For this purpose, you may well have installed CentOS 7 as a minimal platform with no GUI. Once you logged into the system for the first time, you might have found that the network was not working. Which give? It is quite possible that during installation the network was misconfigured or was not configured to start on boot. When this happens, what do you do? You turn to a very simple, but rarely discussed, ncurses version of the NetworkManager tool. I will show you how to use this tool, so you can easily change a network connection on a minimal CentOS 7 installation.

What you will need

Not a lot. In fact, the tool in question will already be installed (even on a minimal installation of CentOS 7). You will however need an account with sudo rights as well as all relevant information about your network. That said, let’s get to work.

Starting and using the tool

From the bash prompt, you start this version of NetworkManager with the command sudo nmtui. From the resulting window (Figure A), select Edit a connection.

Figure A

Figure A

In the next window ( Figure B), a list of your available network interfaces will be displayed. Using the cursor keys, select the connection to edit, then tab to the right pane and using the cursor keys, select Edit.

Figure B

Figure B

Your network interface list.

Press Enter on your keyboard to open the edit window for this interface. Once in the edit window ( Figure C), you can configure your network interface exactly as you need it.

Figure C

Figure C

Modifying a network interface with nmtui.

After editing the connection, tab to the right pane and using the cursor keys select Return. In the main window, select Activate Connection. In the resulting window, select the newly modified connection and activate it by pressing the Enter key on your keyboard. You will know if the interface has been activated because the right pane will say ( Figure D).

Figure D

Figure D

An enabled web interface.

Added a new interface

If in the edit window you don’t see your interface listed, you can always add a new one by clicking on the right pane and selecting Add. In the resulting window ( Figure E), select Ethernet, then in the new window (the one that looks and behaves a lot like the edit interface window) fill in the details for your new interface.

Figure E

Figure E

Selecting the type of connection you want to add.

No more guesswork

And that, my friends, is all it takes to make creating and editing network connections very easy on a minimal CentOS 7 install. No more manual editing of ifcfg files and no more guesswork. The nmtui tool makes it easy to configure networking in CentOS 7.

Also see


Picture: Hundred OS


Comments are closed.