How to setup network after RHEL/CentOS 7 minimal installation

After installing RHEL/CentOS 7 minimal, You may not able to connect network in that machine. This will happen because Ethernet interfaces are not enabled by default.
This guide explain you to setup network on RHEL/CentOS 7.

Setup network on CentOS 7 minimal

First, type “nmcli d” command in your terminal for quick list ethernet card installed on your machine:

"nmcli d" command output
“nmcli d” command output

Type “nmtui” command in your terminal to open Network manager. After opening Network manager chose “Edit connection” and press Enter (Use TAB button for choosing options).

CentOS_7 Network manager screen
CentOS_7 Network manager screen

Now choose you network interfaces and click “Edit

Edit your network interfaces
Edit your network interfaces


DHCP configuration

Choose โ€œAutomaticโ€ in IPv4 CONFIGURATION and check Automatically connect check box and press OK and quit from Network manager.

Set ip adress using DHCP
Set ip adress using DHCP

Reset network services:

service network restart

Now your server will get IP Address from DHCP .

CentOS 7 check ip address
CentOS 7 check ip address

If you want to set a static IP address seeย How to configure static ip address on CentOS 7.

[box type=”note” align=”” class=”” width=””]See also:



  1. Activate network after install:
    1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0

    # /etc/init.d/network restart

    Look for easyrsh app og google play quick reference guide for Solaris, HPUX, Redhat OSs

  2. Hi, guys. I can’t see any available Ethernet after I open nmtui as attached. I have to add a new Ethernet connection every time I create a new VM, and I have to hard code the MAC address to the new Ethernet connection I have created.
    Does anyone know is there a way to detect the connection automatically after I deploy a new VM?

    Thank you in advance.

  3. Hi,I also meet this problem and can’t see any avaiable Ethernet after use “nmcli d”,so how to do? Can you send solutions to my email:bingliang711@hotmail.com

    1. First, verify the status of Network Manager service
      # systemctl status NetworkManager.service
      To check which network interface is managed by Network Manager,
      # nmcli dev status

      I hope I helped you

  4. NetworkManager is still an abomination in my eyes for most uses, but for a workstation I get it.. otherwise NM_CONTROLLED=n is my friend.

  5. For a minimal install, why would you ever use networkmanager? Is it now forced in 7? If not, I would never, ever, use networkmanager on a server. It’s only real use is for mobile devices that hop around wireless networks all the time.
    In 6, I would use system-config-network-tui

  6. I am stuck in a silly thing but not sure how to solve it. To enable “Automarically Connect” checkbox, I am clicking in ENTER button and I am not getting “X”. How can I enable it?

    1. Type following command:
      # vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
      and change on ONBOOT=no to ONBOOT=yes

          1. Open Settings > Network & Internet.
            Click Wi-Fi.
            In the right pane, click Change adapter options.
            Double-click Wi-Fi to open Wi-Fi Status.
            Double-click Wireless Properties.
            Uncheck Connect automatically when this network is in range.
            Click OK, and then Close.

  7. hello, i recently instlled centos7 but i have just LO interface,not eth0!! please could you help me!! tanks

    1. may be the ip is down state…..once use this command #ifup eth0

      here eth0 is default interface.once try friend

  8. Hi,
    How do I connect via wifi? It says it’s unmanaged. I’m real new to Linux ( Centos 7). Thanks for all of your help.

  9. Very straight forward and easy. After mucking around for about an hour, this help me complete in within minutes. Is there any chance you help me one on one? Many thanks

  10. Excellent. I thought Virtualbox would create this interface if you set it to bridged networking. But it did not. So I used nmtui add/manual and entered gateway and 192.* ip address and I could connect to CentOS from the host machine.

  11. Great…that helped me a lot.
    Although on my CentOS 7 Network manager was not running out of the but…..please add in your guide to start it ๐Ÿ˜‰

  12. Thank man, you hit at right point. I wasted so much time by going on to those useless links. But your solution worked like a charm.
    Thanks again!

  13. Hi,

    I installed CentOS 7 32 bit on my HP DV8000 laptop. Wireless connection is working fine but wired connection is not activated. In NetworkManager app even wired tab is disabled.
    # nmcli d
    wlp6s0 wifi connected HKNS-WIRELESS-2
    lo loopback unmanaged —
    No wired device is visible.
    # lspci |grep -i net
    06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
    08:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 01)

    # lspci -nn -k |fgrep -i ether
    08:08.0 Ethernet controller [0200]: Intel Corporation PRO/100 VE Network Connection [8086:1092] (rev 01)

    How can I install the driver and activate the wired network adapter? Please help. Thanks in advance!

    1. Hey Krishna,
      Did you able to solve this issue? I am having the same problem. Please let me know if you have a solution.

      Thank you in advance,

  14. My CentOS VM keeps dropping offline. Sometimes like clock work, 9 ping request timeouts and at times completely randomly goes up and down.

    I have disabled the firewall so that’s not it.
    The nic is also configured for “keep alive”
    I have already allowed SSH and can connect to it when it’s online.
    I have read dmesg, /var/log/messages and don’t see anything that makes sense
    Here’s the interesting part:1
    1. When I restart the network, the connection comes back temporarily
    2. The above does not happen if I restarted the firewalld
    3. ifup ens192 && ifup ens192 does bring the network back temporarily just like #1
    SSH is enabled and root logins are permitted and tested successfully

  15. On CentOS 8 (minimal install):

    1. Run the command below to make sure the network interface/device is called eth0.
    nmcli d

    If “eth0” is not the name of your network interface, then replace “eth0” with the name of your interface in part 2 commands

    2. If the interface name is eth0, then run (as root) these commands:

    ifup eth0
    sed -c -i “s/\(ONBOOT *= *\).*/\1yes/” /etc/sysconfig/network-scripts/ifcfg-eth0
    systemctl restart NetworkManager.service

    Your done!

    The first command brings up the network interface. At this point you should be able to ping google.com & connect via ssh
    The second command sets the ONBOOT variable to “yes” in the ifcfg-eth0 file so that the interface starts up automatically on boot.
    The third command restarts the NetworkManager service.

  16. How do you reset network services? I have done all of the other steps but do not know where to go to do a service network restart.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button