How to easily edit a network connection on a CentOS 7 minimal installation

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

CentOS 7 is a very powerful server platform. With this open source, enterprise-ready Linux distribution, the sky is the limit with what you can do. You can install it with a GUI to make things easy, but that takes up system resources. To that end, you might well have installed CentOS 7 as a minimal, GUI-less platform. Once you have logged into the system for the first time, you might have found that networking doesn't function. What gives? It is quite possible that during the installation, networking was misconfigured or wasn't configured to start at boot. When that happens, what do you do? You turn to a very easy, but rarely discussed, ncurses version of the NetworkManager tool. I'm going to show you how to use this tool, so you can easily edit a network connection on a minimal CentOS 7 installation.

What you'll need

Not much. 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 the pertinent information about your network. With 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

The main nmtui window.

In the next window ( Figure B), you'll be presented with a listing of your available network interfaces. Using your cursor keys, select the connection to be edited and then tab to the right pane and using your cursor keys select Edit.

Figure B

Figure B

Your network interface listing.

Hit Enter on your keyboard to open the edit window for this interface. Once you're in the edit window ( Figure C), you can configure your network interface precisely how you need it.

Figure C

Figure C

Editing a network interface with nmtui.

After you've edited the connection, tab to the right pane, and using your cursor keys select Back. In the main window, select Activate a connection. In the resulting window, select the newly edited connection and activate it by hitting the Enter key on your keyboard. You'll know if the interface was activated as the right pane will say <Deactivate> ( Figure D).

Figure D

Figure D

An activated internet interface.

Adding a new interface

If from the Edit window you don't see your interface listed, you can always add a new one by tabbing to the right pane and selecting Add. In the resulting window ( Figure E), select Ethernet, and then in the new window (one that looks and behaves very much like the interface edit 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 there is to making the creation and editing of networking connections on a minimal CentOS 7 installation very easy. No more having to manually edit ifcfg files and no more guesswork. The nmtui tool makes configuring networking in CentOS 7 a breeze.

Also See

Image: CentOS

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website

Editor's Picks

Free Newsletters, In your Inbox