1.13 Single-user mode
1, single-user mode is mainly used to forget the root password;
Restart Device: Reboot;init6;shutdown-r now
Shutdown: Init 0;poweroff
Reboot the device into the following States:
Select the upper and lower direction keys;
Press the E key to enter the Grub interface
Locate the system boot disk, boot the hard disk, load the kernel, etc.
Find Ro,ro indicates read only;
Change RO to RW, show-read/write
Overriding the RW parameter
Press Ctrl+w
Change Password:
An important step:
Restart your device and log in with your new password
1.14 Rescue Mode
1. Rescue mode
[Email protected] ~]# ls-l/usr/lib/systemd/system/runlevel*target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel0.target-Poweroff.target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel1.target-Rescue.target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel2.target-Multi-user.target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel3.target-Multi-user.target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel4.target-Multi-user.target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel5.target-Graphical.target
lrwxrwxrwx. 1 root root 2017/usr/lib/systemd/system/runlevel6.target-Reboot.target
Divided into 6 levels;
When restarting, note:
Loading the optical drive at startup
Restart after rebooting into BIOS setup
There are 4 ways to choose,
This is another change to the root password, using the form of a disc;
If you change the wrong file, you can enter the rescue mode, the wrong file is changed correctly;
1.15 Cloning a virtual machine
Cloning of VMS
Shut down the VM, then click Manage-Clone
Log in to a new VM
Then modify the IP address of the new VM, otherwise it will cause IP conflicts;
The UUID is deleted and the new IP address is configured;
Then restart the Network service
#systemctl Restart Network.service
Ifconfig
View the IP address,
Then reset hostname, host name
Then exit the login again and the hostname has changed
To change the configuration file for a host name
Changing the hostname is actually a configuration file that changes the host name
1.16 Linux machines log in to each other
1.2 servers log in to each other
If 2 servers are logged in to each other, using the SSH service, is the SSH password-free login method,
1. Server B connects to server A
2. Generate a key pair on Server B;
[Email protected] ~]# Ssh-keygen
,. Ssh/id_rsa is the private key;. ssh/id_rsa.pub-is the public key;
Then the contents of the public key are copied to A;
Turn off SELinux
Log on to server a directly from server B without a password
1.13 Single-user mode 1.14 Rescue mode 1.15 clone virtual machine 1.16 Linux machines log in to each other