Operations 8 min read

Master Linux Network Management: Configure, Rename, and Control Interfaces on CentOS 7

Learn how to configure network interfaces on CentOS 7 using NetworkManager tools like nmcli, nmtui, and nm-connection-editor, rename devices, edit configuration files, and apply changes via systemctl, covering both command‑line and graphical methods for effective Linux network management.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux Network Management: Configure, Rename, and Control Interfaces on CentOS 7

Linux Learning – Network Management

1. Network Configuration

CentOS 7 network interface names have the following characteristics:

Ethernet interfaces start with en, WLAN with wl, WWAN with ww.

The next character indicates the adapter type: o for on‑board, s for hot‑plug slot, p for PCI.

The third character x is used for MAC address merging, not used by default.

The final numeric part is the index, ID or port.

If the name cannot be determined, the traditional ethn naming is used.

NetworkManager is a dynamic network controller and configuration system that keeps devices and links active when available. Multiple connections can be applied to the same device, but only one can be active at a time. CentOS/RHEL 7 ships with NetworkManager enabled by default.

Check the status with systemctl status NetworkManager or systemctl status network.

NetworkManager provides the tools nmcli, nmtui and nm-connection-editor.

nmcli device – list all devices

# nmcli device
DEVICE      TYPE      STATE   CONNECTION
virbr0      bridge    unmanaged  --
ens33       ethernet  unmanaged  --
lo          loopback  unmanaged  --
virbr0-nic  tun       unmanaged  --

nmcli device show – show detailed device information

# nmcli device show
GENERAL.DEVICE: virbr0
GENERAL.TYPE: bridge
GENERAL.HWADDR: 52:54:00:8C:E1:EA
GENERAL.MTU: 1500
GENERAL.STATE: 10 (unmanaged)
...

nmcli connection – list all connections

# nmcli connection
NAME   UUID                                  TYPE      DEVICE
ens33  5ae89fd0-897c-40cc-bdfa-fd716dd6fcc5  ethernet  --

To add a connection:

# nmcli connection add con-name ens33-siso autoconnect yes ifname ens33 type ethernet

Activate a connection with nmcli connection up <name> and delete it with nmcli connection delete <name>.

Network configuration can also be edited directly in the interface configuration files, e.g., /etc/sysconfig/network-scripts/ifcfg-ens33.

# vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="5ae89fd0-897c-40cc-bdfa-fd716dd6fcc5"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.30.101
NETMASK=255.255.255.0
GATEWAY=192.168.30.2
DNS1=114.144.144.144

After editing, reload the connection and restart the network service:

# nmcli connection reload
# nmcli connection down ens33
# systemctl restart network

The text‑based UI nmtui can also manage networks:

# nmtui

The graphical editor nm-connection-editor provides a GUI for the same purpose.

To change the hostname, edit /etc/sysconfig/network and use the hostname command:

# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master
# hostname master

9.2 Change Interface Name to eth0

Rename the interface configuration file and edit its contents:

# cd /etc/sysconfig/network-scripts
# mv ifcfg-ens33 ifcfg-eth0
# vi ifcfg-eth0
TYPE="Ethernet"
...
NAME="eth0"
DEVICE="eth0"

Add a kernel parameter to preserve the naming:

# vi /etc/sysconfig/grub
GRUB_CMDLINE_LINUX="... net.ifname=0"

Reboot the system for changes to take effect.

9.3 Chapter Summary

This chapter introduced Linux network configuration, showing the main configuration file paths for network interfaces and how to rename them.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxCentOSnetwork managementnmcliNetworkManager
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.