On Oracle Virtual Box after installing CentOS 7 from an ISO and logged in but the IP address was missing. After checking /etc/sysconfig/network-scripts/ifcfg-enp0s3 file, found that the ONBOOT=no
was set. But do not edit the file directly as this is deprecated in CentOS 7. So use nuclei instead.
1. Login as root and run the following command
# nmcli con mod enp0s3 connection.autoconnect yes
2. Bring down the NIC
# nmcli con down enps03
3. Bring up the NIC
# nmcli con up enp0s3
4. Now run ip a s
Note: After changing the Network Setting for the NIC - I used "Bridged adapter" this made sure that the local desktop/Laptop and the CentOS VM is in the same LAN so that you can ssh from ssh client.
No comments:
Post a Comment