CentOS 8 Network Configuration

Set the Static IP address of CentOS 8 machine through Terminal

View Network status

The IP address can be configured in the CentOS 8 Operating system using the NIC(Network Interface Card) system files. To configure the static IP address on CentOS 8, first, know the IP address and Interface Card name of your network using the command:

1
ip a

Configure

After getting the IP address of your system and knowing the Network Interface Card name, run the following command to know the file name of the Interface card:

1
ls /etc/sysconfig/network-scripts/

1
vi /etc/sysconfig/network-scripts/ifcfg-ens33

1
2
3
4
5
6
7
8
BOOTPROTO=static

ONBOOT=yes
IPADDR=192.168.88.254
NETMASK=255.255.255.0
GATEWAY=192.168.88.1
DNS1=223.5.5.5
DNS2=223.6.6.6

Restart NetworkService

1
systemctl restart NetworkManager

Set the Static IP address of CentOS 8 machine using GUI method

The IP address can also be changed from the GUI of CentoS 8 by going to the Networks tab in the CentOS 8 Operating system settings.

First, go to the Application menu, search for the settings, and from the search results, click on the Settings icon as shown below:

A pop-up window will appear containing the details about network connection like IP Address, Hardware Address, Default Route, and DNS.


CentOS 8 Network Configuration
https://www.hardyhu.cn/2022/02/13/CentOS-8-Network-Configuration/
Author
John Doe
Posted on
February 13, 2022
Licensed under