CentOS7
1. On the ordinary user switching CentOS7 root, each switch
The current average user logged in, want to switch to the root user, you need to enter the command
su
You need to enter the root password. When the input screen does not display, direct input finished, press Enter
After the transport, i.e. switch to the root user
The user wants to switch from the root to the regular user, just type
su 用户名
You can switch to the regular user! !
2.CentOS7 how to save and exit the vi editor
Save command
Press the ESC key to skip the command mode, then:
: W Save the file but do not quit vi
: W file will be saved to file in another modification, do not quit vi
:! W forced to save, do not quit vi
: Wq Save the file and exit vi
:! Wq forced to save the file and exit vi
q: do not save the file and exit vi
:! Q does not save the file, force quit vi
:! E to give up all the changes, starting with the last saved the file to edit
3.CentOS7 set about the network
Bottles CentOS7, we are not on the Internet beginning of
At this time, you can enter the command dhclient, you can obtain an IP address automatically, and then view the command ip addr IP ( to switch to root user in the operating file )
But this time acquired IP is dynamic, after the next reboot the system, IP address will change, this time we can set the system as a static IP is provided as follows:
(1) Click on the upper left corner of VMware virtual machines. " edit ", select" virtual network compiler. "
(2) Select VMnet8 (NAT mode), then click on the right side of the "NAT settings" at this time you will see the following interface
(3) Input the command line: vim / etc / sysconfig / network-scripts / ifcfg-ens33
(4) At this time will enter the following interface
(5) The ONBOOT = no to yes, the BOOTPROTO = dhcp to BOOTPROTO = static, and adding a few lines after the content:
the IPADDR = 192.168.127.128
NETMASK = 255.255.255.0
the GATEWAY = 192.168.127.2
the DNS1 = 119.29.29.29
(6) Save and exit, and then enter the command: systemctl restart network.service to restart the network services.
(7) Check again ip addr IP, and communicates with the ping command to test the network.
Thus, IP is now set.
Reprinted to:
https://www.cnblogs.com/sxdcgaq8080/p/10041435.html
https://blog.csdn.net/akipa11/article/details/81414875