If you’re having trouble changing your CentOS network connections from the command line, Jack Wallen shows you a tool that will make that struggle easier.
What happens after you install a GUI-less instance of CentOS as a server operating system and you find that the network connection is not working? What do you do? Do you have to manually edit network configuration files? Hopefully not.
With CentOS, there is a built-in tool to help you modify these connections. The tool is called nmtui (NetworkManager Text User Interface). This tool makes it easy to manage these network connections on an endpoint-only instance of CentOS.
Let me show you how to use it.
Log in to your CentOS machine and on the terminal type sudo nmtui.
In the resulting window, select Edit connection with the cursor keys and press Enter on your keyboard. In the next window, select the network adapter to configure, press Tab, select Edit (using the cursor keys) and press Enter. You should now be in the Edit Connection window, where you can enter all of your connection details.
SEE: Network Security Policy (TechRepublic Premium)
You will use the cursor keys on your keyboard to navigate through the different configuration options. You’ll find plenty of options to tweak, so be sure to look at everything carefully. Once you have configured the network card exactly as you need it, scroll down (using the cursor keys) to the bottom of the window and select OK.
Press Enter on your keyboard and the changes are saved. Return to the first nmtui window and select Activate Connection. Select the connection you just edited and tap Disable.
Once the connection is disabled, you will then need to re-enable it by selecting the connection, tapping Enable, and pressing Enter on your keyboard. Your changes are now applied and everything should be ready.
Congratulations, you have just changed your CentOS network connection, without a GUI.
Subscribe to TechRepublic’s How To Make Tech Work YouTube Video for all the latest tech tips for professionals from Jack Wallen.