How to do centos 8 network config

CentOS 8 is a popular Linux distribution that is widely used for servers and other enterprise-level applications. One of the key components of any server is its network configuration, and CentOS 8 provides a number of tools and options for configuring network settings.

The primary tool for configuring network settings in CentOS 8 is the Network Manager. This tool provides a graphical user interface (GUI) for managing network connections and settings. It can be used to configure both wired and wireless network connections, as well as to configure IP addresses, DNS servers, and other network settings.

Another tool that can be used to configure network settings in CentOS 8 is the nmcli command-line tool. This tool provides a command-line interface for managing network connections and settings and can be used to configure both wired and wireless network connections, as well as to configure IP addresses, DNS servers, and other network settings.

One common task that may be required when configuring network settings in CentOS 8 is to configure a static IP address. This can be done using the Network Manager or the nmcli command-line tool.

To configure a static IP address using the Network Manager, you would open the Network Manager by clicking on the network icon in the top right corner of the screen, then select “Edit Connections.” Next, select the connection that you want to configure, and then select the “IPv4 Settings” tab. From here, you can select the “Manual” option to configure a static IP address, and then enter the desired IP address, netmask, gateway, and DNS server information.

To configure a static IP address using the nmcli command-line tool, you would open a terminal window and use the nmcli command to modify the connection.

nmcli connection modify <connection name> ipv4.method manual ipv4.addresses <IP address>/<netmask> ipv4.gateway <gateway> ipv4.dns <DNS server>

It’s also possible to add multiple DNS servers, separating them with a comma.

Another common task that may be required when configuring network settings in CentOS 8 is to configure a hostname. This can be done by editing the /etc/hostname file and adding the desired hostname. Once the file is saved, the hostname can be changed by running the hostnamectl command.

It is also important to configure the firewall settings in CentOS 8. The firewall can be configured using the firewall-config graphical tool or using the firewall-cmd command-line tool. Firewall-config allows configuring of firewall settings in a graphical way, while firewall-cmd allows configuring and controlling the firewall using the command line.

In conclusion, configuring network settings in CentOS 8 can be accomplished using the Network Manager or the nmcli command-line tool. Both tools can be used to configure static IP addresses, DNS servers, and other network settings. It’s also important to configure the hostname and firewall settings, as well as to keep your system up-to-date with the latest security patches. It’s important to understand the usage and requirements in order to properly configure the network settings for your specific scenario.

Atiqur Rahman

I am MD. Atiqur Rahman graduated from BUET and is an AWS-certified solutions architect. I have successfully achieved 6 certifications from AWS including Cloud Practitioner, Solutions Architect, SysOps Administrator, and Developer Associate. I have more than 8 years of working experience as a DevOps engineer designing complex SAAS applications.

Leave a Reply