Linux basics,

Source: Internet
Author: User

Linux basics,
In rescue mode, there are 7 OPTIONS 0-6 when centos6 is started; In centos7, check the startup options: ls-l/usr/lib/systemd/system/runlevel * target.

 

Set the bios for boot and select the optical drive to start;

 

In centos7, the rescue mode is Troubleshooting. Select this option and enter;

 

Select Rescue a Centos Linux system

 

 

Enter 1 to continue

 

Enter chroot/mnt/sysimage, enter passwd root to prompt you to change the root user password, enter a new password, and then enter the password again to change the root password. Turn off the power and uninstall the optical drive; clone a VM first shut down the system where the VM runs; manage-clone-next-create a link clone (save space) Wait for completion, close it; after starting the VM, edit the IP address, delete the UUID column, save and exit, restart the network service, and run vim/etc/systemconfig/network-script/if-restart systemctl restart network. servicehostname to view the host name; hostnamectl set-hostname liyang-01 to change the host name; launch and re-enter to view the host name; the host name configuration file in cat/etc/hostname to save the snapshot

 

Standard syntax for login between Linux Hosts: ssh username @ ipssh 192.168.164.13001 02 01

W View

 

Standard syntax ssh-p 22 root@192.168.164.129ssh-p specifies port; ssh-keygen tool automatically generates Public Key Private Key directly press enter (no password is set here) the public key and private key are stored in/root/by default /. ssh/directory

 

Cat/root/. ssh/id_rsa.pub view the public key, copy the public key to open host 01, vi/root/. ssh/authorized_keys, paste the remarks, save and exit;

 

Getenforce: Check the selinux status. Enforcing is enabled, permissive is disabled, and setenforce 0 is disabled;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.