Setting up a static IP address on CentOS - aaralik1/SYS-255 GitHub Wiki

In order to set up a static IP address on CentOS, you should type "nmtui" command in the command line. Nmtui will allow you to manage your network settings in Linux. After that, you will be navigated to the Network Adapter TUI which you should edit the connection and by using the arrows and the enter key. Then, navigate to the IPv4 Configuration and choose the Manual option. Which then you will show the configuration and manually add the IP address, the gateway, the DNS servers, as well as the domain controller you may have. After that, make sure "Automatically connect" and "Available to all users" is checked, then hit ok. After that, you will be directed back to the Network Adapter TUI and you should scroll down to the "set system hostname" option. And then you will set the appropriate name. Next, quit the system and type "systemctl restart network" in order to give your network a fresh start. Then, you can double check to see the new network changes are in by typing the command, "ifconfig."