linux network manager gui

Configuring a Linux server to use a static IP address typically involves modifying the network configuration files.The exact process might vary slightly depending on the Linux distribution you’re using, but the general steps are similar. Here’s a general guide:

Identify the Network Interface

Determine which network interface you want to assign the static IP address to.You can find this information using the ifconfig or ip addr command.

Firstly, list the IP of all interfaces

  • ifconfig -a

Edit Network Configuration File

Linux uses the ifcfg files to configure network interfaces. Navigate to the directory containing these files:

  • cd /etc/sysconfig/network-scripts

Find the configuration file for your network interface. Typically, it’s named something like ifcfg-eth0 or ifcfg-enp0s3. You can list the files in this directory with:

  • ls ifcfg-*

Edit the Configuration File

Use a text editor like nano or vi to edit the appropriate configuration file. For example:

  • nano ifcfg-eth0

Replace eth0 with the name of your network interface. Update the file with the following lines:

BOOTPROTO=static IPADDR=<your_static_IP_address> NETMASK=<your_subnet_mask> GATEWAY=<your_default_gateway> DNS1=<your_primary_DNS_server> DNS2=<your_secondary_DNS_server>

Replace <your_static_IP_address>, <your_subnet_mask>, <your_default_gateway>, <your_primary_DNS_server>, and <your_secondary_DNS_server> with the appropriate

values for your network. For example:







Save your changes and exit the text editor.

Restart Network Service

Once you’ve made the necessary changes, restart the network service to apply the new configuration:

  • systemctl restart network
Verify Configuration:

After restarting the network service, verify that your static IP address is configured correctly by running:

  • ip addr

Look for your network interface in the output and confirm that the static IP address, subnet mask, and gateway are set correctly.

using nmtui utility

nmtui, short for Network Manager Text User interface is a GUI tool that painlessly allows you to configure your network interface without having to touch the command line. It can be installed both on RPM and Debian based distributions.

For Centos & linux
  • yum install NetworkManager-tui
  • dnf install NetworkManager-tui For Fedora 21 and later
Start nmtui:

Type the following command and press Enter:

This will open the NetworkManager Text User Interface.
Navigate to Edit a Connection:

In the nmtui interface, use the arrow keys to navigate to the “Edit a connection” option and press Enter.

Select the Interface:

You’ll see a list of network interfaces. Use the arrow keys to select the interface you want to configure and press Enter.

Edit IPv4 Configuration

After selecting the interface, navigate to the “IPv4 CONFIGURATION” option and press Enter.

Add IP Address, Subnet Mask, Gateway, and DNS

Navigate to each field (IP address, Subnet Mask, Gateway, DNS servers) and enter the appropriate values. Press Tab to move between fields.

Save Changes

Once you’ve entered all the necessary information, navigate to the “OK” button and press Enter to save your changes.

Exit nmtui

Navigate to the “Back” button and press Enter to exit the configuration interface.

Restart Network Service:

To apply the changes, you may need to restart the network service. You can do this by typing:

  • systemctl restart NetworkManager

Verify Configuration

After restarting the network service, you can verify that your static IP address is configured correctly by running:

  • ip addr

Look for your network interface in the output and confirm that the static IP address, subnet mask, gateway, and DNS servers are set correctly.

That’s it! You’ve now configured a static IP address using the nmtui utility in CentOS.

Leave a Comment