In a nutshell:

I cannot see my newly added NIC with nmtui on CentOS 8.  How can I resolve this?


I've installed a CentOS 8 VM on VirtualBox.

Usually I configure two NICs during the installation:

  • One as NAT so it can connect to the outside network
  • The other as Host Only so I can access it with internal IP

I didn't use Bridged network for I don't want to expose those VMs to the outside world.

It works well for all my VMs.

But when installing a new server I forgot to set a second NIC on VirtualBox during the OS installation, so I added a new NIC in VirtualBox after the installation.

Now I'm able to see the the newly added NIC with both ip addr:

[root@cent8-4 ~]# ip addr
1: lo: ...
2: enp0s3: /*My working NIC*/ <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:de:33:18 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic noprefixroute enp0s3
       valid_lft 84236sec preferred_lft 84236sec
    inet6 ...
3: enp0s8: /*The newly added NIC*/ <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:a7:c7:56 brd ff:ff:ff:ff:ff:ff
4: virbr0: ...
5: virbr0-nic: ...

and nmcli device:

[root@cent8-4 ~]# nmcli device
enp0s3      ethernet  connected     enp0s3  /*My working NIC*/
virbr0      bridge    connected     virbr0
enp0s8      ethernet  disconnected  --      /*The newly added NIC*/
lo          loopback  unmanaged     --
virbr0-nic  tun       unmanaged     --

Note that enp0s3 is the NIC that I configured during the installation, while enp0s8 is the one that I added after the installation.

But when I use nmtui to configure the IP address of the newly added NIC, I just can't see it in "Edit a connection" screen:

"Edit a connection" screen

Neither can I see it in "Activate a connection" screen:

"Activate a connection" screen

So how can I make nmtui recognize this new NIC?

Some articles say that I have to use "auto enp0s8" to initialize the NIC, but it seems that CentOS 8 doesn't have that tool:

[root@cent8-4 network-scripts]# auto enp0s8
bash: auto: command not found...
  • can you please 'sudo systemctl restart NetworkManager' and check again?!
    – binarysta
    Commented May 29, 2020 at 9:45
  • I did a network search for “auto enp0s8”, and most of the top ten results were in non-English languages, which is a bad sign. But the ones that were in English, like this, indicate that “auto enp0s8” is a line that you’re supposed to add to /etc/network/interfaces, not a command that you’re supposed to type into the shell. Commented Jan 23, 2022 at 2:29

3 Answers 3

  1. cd /etc/sysconfig/network-scripts
  2. cp ifcfg-enp0s3 ifcfg-enp0s8
  3. change the setting in ifcfg-enp0s8 (NAME=enp0s8, DEVICE=enp0s8)
  4. systemctl restart NetworkManager
  1. nmcli device set <device name> managed yes
  2. nmtui <device name>

In NetworkManager you configure and activate connection profiles. A profile is a bunch of settings for configuring a device/interface.

Create a new profile for the device and activate it. You can do that with nmtui or another NetworkManager client application of your choice (like nmcli or nm-connection-editor).

See also nmcli device vs. nmcli connection.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .