Menu
User

DropVPS Team

Writer: Cooper Reagan

How To Configure Static IP on CentOS 8

How To Configure Static IP on CentOS 8

Publication Date

08/15/2025

Category

Articles

Reading Time

2 Min

Table of Contents

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.

Linux VPS
๐ŸงLinux VPS

Need a Linux Server for This?

Run Debian, Ubuntu, or any Linux distro on DropVPS โ€” fast NVMe SSD, full root access, and 24/7 support. Perfect for everything you just read.

  • Full Root Access
  • Debian & Ubuntu Ready
  • 99.99% Uptime
  • 24/7 Support
Get Linux VPS โ†’

No commitment ยท Cancel anytime

U
Loading...

Related Posts