Linux virtual machine forgot root password

Source: Internet
Author: User

First of all, for the common switch machine, restart the command has;

Shutdown-h now: Turn off the machine

Shutdown-r Now: Restart

Poweroff: Shut down the machine

Poweroff/half: Restart

Init 0/6: Shutdown/restart

Reboot: Restart


To change the root password:

Power on or restart, and then press the up and down arrows to select the boot entry above; The following two images appear

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/89/D7/wKiom1gfKlbSEJzTAAAJ5z4gwyM765.png-wh_500x0-wm_3 -wmp_4-s_2560029102.png "style=" Float:none; "title=" 1.png "alt=" Wkiom1gfklbsejztaaaj5z4gwym765.png-wh_50 "/>

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/89/D4/wKioL1gfKleRWjFyAAAsSxjDR_E572.png-wh_500x0-wm_3 -wmp_4-s_926859442.png "style=" Float:none; "title=" 2.png "alt=" Wkiol1gfklerwjfyaaassxjdr_e572.png-wh_50 "/>


Find the corresponding line, remove the superfluous, add RW rd.break, and then ctrl+x

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/89/D7/wKiom1gfKlejmFS4AAAHzG3uUaA296.png-wh_500x0-wm_3 -wmp_4-s_1255032051.png "style=" Float:none; "title=" 3.png "alt=" Wkiom1gfklejmfs4aaahzg3uuaa296.png-wh_50 "/>


Enter the following command line to enter the new password, note must not appear error, if wrong, boot will have a problem;

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/89/D4/wKioL1gfKljgHkpFAAAQ-TTTfic703.png-wh_500x0-wm_3 -wmp_4-s_1993336781.png "style=" Float:none; "title=" 5.png "alt=" Wkiol1gfkljghkpfaaaq-tttfic703.png-wh_50 "/>


Successful Login

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/D4/wKioL1gfKlii2nfrAAADiNtM8wk242.png-wh_500x0-wm_3 -wmp_4-s_1296971884.png "style=" Float:none; "title=" 6.png "alt=" Wkiol1gfklii2nfraaadintm8wk242.png-wh_50 "/>


Here is a direct way to change the root password:

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/89/D7/wKiom1gfKliAvUMjAAAMz4pTC8Q903.png-wh_500x0-wm_3 -wmp_4-s_1537809028.png "style=" Float:none; "title=" 7.png "alt=" Wkiom1gfkliavumjaaamz4ptc8q903.png-wh_50 "/>




Linux Network (Configure network):

1.nmcli con Show: View ' System eth0 '

2.NMCLI connection Modify ' eno*** ' ipv4.mothod manual ipv4.addresses ' 192.168.16.11/24 192.168.16.254 '

3.systemctl Restart NetworkManager

4.ifconfig View IP (if you do not have this command, install net-tools)

5.NETSTAT-NTLP: View port number;



This article is from the "11773640" blog, please be sure to keep this source http://11783640.blog.51cto.com/11773640/1870041

Linux virtual machine forgot root password

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.