Network configuration is a fundamental part of Linux administration. Whether you’re managing a server or a virtual machine, you’ll often need to assign IP addresses, configure DNS, and manage connections.
In Oracle Linux, you can manage networks using:
-
NetworkManager command-line tools (nmcli)
-
Text User Interface (nmtui)
-
Traditional config files (for advanced users)
In this blog, you’ll learn how to view, configure, and troubleshoot network settings step by step.
Step 1: Check Your Current Network Status
To see your active network interfaces:
ip addr show

or the shorter version:
ip aTo check if your system has internet access:
ping -c 4 google.com

Step 2: Using nmcli (Command Line)
nmcli is a powerful tool to configure and manage network interfaces without editing files manually.
List all connections:
nmcli connection show
Show active interfaces:
nmcli device status
Example output:

Step 3: Configure a Static IP Address
You can assign a static IP using nmcli as follows:
sudo nmcli connection modify "Wired connection 1" ipv4.addresses 192.168.1.50/24
sudo nmcli connection modify "Wired connection 1" ipv4.gateway 192.168.1.1
sudo nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli connection modify "Wired connection 1" ipv4.method manual
sudo nmcli connection up "Wired connection 1"ip addr show
and
nmcli device show enp1s0Step 4: Switch Back to DHCP
If you want your system to use automatic IP configuration via DHCP:
sudo nmcli connection modify "Wired connection 1" ipv4.method auto
sudo nmcli connection up "Wired connection 1"Step 5: Using nmtui
If you prefer a menu-style interface, nmtui is perfect for quick setups.
-
Run:
sudo nmtui
-
You’ll see a simple blue-screen menu.
-
Choose:
-
Edit a connection
-
Activate a connection
-
Set system hostname
-
-
Use arrow keys and Enter to navigate.
-
Save your settings and quit.
-
Restart the network:
sudo systemctl restart NetworkManager

Step 6: View and Edit Network Configuration Files
Network settings are stored in:
/etc/sysconfig/network-scripts/
To view a configuration file:
cat /etc/sysconfig/network-scripts/ifcfg-enp1s0
Example file for a static IP:
DEVICE=enp1s0
BOOTPROTO=none
ONBOOT=yes
IPADDR=******
PREFIX=24
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
After editing:
sudo systemctl restart NetworkManager
Step 7: Test and Troubleshoot Network Connectivity
Ping the gateway:
ping -c 4 192.168.1.1
Check DNS resolution:
nslookup google.com
Trace the route to a host:
traceroute google.com
If something fails, restart the network service:
sudo systemctl restart NetworkManager
Step 8: Set Hostname and Verify
Set a new hostname:
sudo hostnamectl set-hostname server1.example.com
Verify:
hostnamectlYou’e successfully learned how to view and configure network settings on Oracle Linux using both command-line and interactive tools.Understanding network setup is crucial for connecting servers, managing remote access, and enabling updates or services.
In the next post, we’ll move to user and group management — a core administrative task every Linux admin must master.
Summary
|
Task |
Command |
|
List devices |
nmcli device status |
|
Configure static IP |
nmcli connection modify ... |
|
Switch to DHCP |
nmcli connection modify ... ipv4.method auto |
|
Edit via UI |
nmtui |
|
Restart NetworkManager |
systemctl restart NetworkManager |
|
Set hostname |
hostnamectl set-hostname newname |
