DropVPS Team
Writer: Cooper Reagan
How To Configure Static IP on CentOS 8

Table of Contents
What you will read?
On CentOS 8, network interfaces are managed by NetworkManager, which makes configuring a static IP simple using the nmcli command instead of editing config files manually.
Step 1: Identify Your Network Interface
List all active network connections:
nmcli device status
Look for the interface you want to configure, e.g., enp0s3 or eth0.
Step 2: Set a Static IP
Replace enp0s3 with your interface name and assign an IP, gateway, and DNS:
sudo nmcli con mod enp0s3 ipv4.addresses 192.168.1.100/24
sudo nmcli con mod enp0s3 ipv4.gateway 192.168.1.1
sudo nmcli con mod enp0s3 ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli con mod enp0s3 ipv4.method manual
Step 3: Restart the Network Connection
Apply the changes by restarting the connection:
sudo nmcli con down enp0s3
sudo nmcli con up enp0s3
Step 4: Verify the Static IP
Check that your interface has the new static IP:
ip a
You should see 192.168.1.100 (or the IP you set) assigned to the interface. Your CentOS 8 machine now has a static IP configured using Network Manager, ready for stable network access.
U
Loading...