After configuring the IP to enter the operating system interface, enter the root user password.
<[email protected] ~>#
Root for user
localhost hostname (modifiable)
Root user is followed by #
Other users are $
===========================================================================================
dhclient automatically acquire IP (may change after restarting the machine)
DHCP will automatically assign a new IP after the IP is requisitioned by another workstation, which is what DHCP does.
IP Add view ip/etc/sysconfig/network-scripts/ifcfg-xxx NIC configuration file
/etc/sysconfig/network-scripts/ifcfg-xxx NIC configuration file
Static IP Address Modification method:
Bootproto = dhcp ===> static
Increase:
Ipaddr=xxx.xxx.xxx.xxx
Netmask=xxx.xxx.xxx. X
Gateway=xxx.xxx.xxx. X
Dns1=119.29.29.29 (General)
Wq
Systemctl Restart Network.service (restart network)
===========================================================================================
Network troubleshooting
See if the configuration file has errors first
And see if the host virtual machine is in the same network segment
Start a new network service
Change the network mode to bridge to the same network segment as the host.
===========================================================================================
Windows View IP method cmd run
Dhclient run once and can no longer run
Kill and run with Dhclient-r.
Route-n View Gateway
===========================================================================================
There are no ifconfig commands in Centos7. View with IP addr
or yum install net-tools-y installation command
Linux Learning Notes (2)