Internet
Connecting to Internet via Terminal
https://extr3metech.wordpress.com/2013/05/23/configuring-network-in-centos-6-3-virtual-box-screenshots/#:~:text=Open%20Virtual%20Box%20and%20right,from%20the%20drop%20down%20menu.
Make sure your Virtual machine’s netowrk adapter is set to bridge adapter or Host only. ssh does not work well with the NAT Netowrk Adapter in my experience.
1) check if you have internet
$ ping www.google.com
If you don’t get a response then login as root and follow the below commands.
2) As root run the following:
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
`/etc/sysconfig/network-scripts/ifcfg-eth0`:
This will open a network configuration script. Set change ONBOOT
to say yes like this: ONBOOT=yes
DEVICE=eth0
TYPE=Ethernet
UUID=12c18b25-5d0c-40d6-9f56-d53a027b1e78
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
HWADDR=08:00:27:86:2D:0D
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
Now, press ESC
and type :wq
and hit ENTER
to save and exit the configuration file.
3) Restart the service or reboot the machine to make the changes take effect.
To restar the network service run:
$ service network restart
To reboot your machine run:
$ reboot
Journal
- 2020.06.10 Created file
- Created
Connecting to Internet via Terminal
section
- Created