• news
  • pics
  • linux
  • windows
  • proxmox
  • game
  • news
  • pics
  • linux
  • windows
  • proxmox
  • game
Home
linux

Linux 忘记密码解决方法

很多朋友经常会忘记Linux系统的root密码,linux系统忘记root密码的情况该怎么办呢?重新安装系统吗?当然不用!进入单用户模式更改一下root密码即可。

步骤如下:

重启linux系统

3 秒之内要按一下回车,出现如下界面

然后输入e

在 第二行最后边输入 single,有一个空格。具体方法为按向下尖头移动到第二行,按”e”进入编辑模式

在后边加上single 回车

最后按”b”启动,启动后就进入了单用户模式了

此时已经进入到单用户模式了,你可以更改root密码了。更密码的命令为 passwd

【使用系统安装光盘的救援模式】

救援模式即rescue ,这个模式主要是应用于,系统无法进入的情况。如,grub损坏或者某一个配置文件修改出错。如何使用rescue模式呢?

光盘启动,按F5 进入rescue模式

输入linux rescue 回车

选择语言,笔者建议你选择英语

选择us 键盘

这里问你是否启动网络,有时候可能会联网调试。我们选no

这里告诉我们,接下来会把系统挂载在/mnt/sysimage 中。

其中有三个选项:

  • Continue 就是挂载后继续下一步。 
  • Read-Only 挂载成只读,这样更安全,有时文件系统损坏时,只读模式会防止文件系统近一步损坏。
  • Skip就是不挂载,进入一个命令窗口模式。 

这里我们选择Continue。

至此,系统已经挂载到了/mnt/sysimage中。接下来回车,输入chroot /mnt/sysimage 进入管理员环境。

提示: 其实也可以到rescue模式下更改root的密码的。这个rescue模式和windows PE系统很相近。

当运行了chroot /mnt/sysimage/ 后,再ls 看到目录结构和原来系统中的目录结构是一样的。

没错!现在的环境和原来系统的环境是一模一样的。你可以输入exit 或者按Ctrl + D退出这个环境。然后你再ls 看一下

这个目录其实就是rescue模式下的目录结构,而我们的系统文件全部在 /mnt/sysimage目录下。

Previous article Linux 系统启动过程
Next article Linux 文件基本属性

therock

17 Comments

  1. keto chicken soup
    July 7, 2021 at 12:09 pm

    what is the keto diet all about

  2. keto at chipotle
    July 7, 2021 at 9:54 am

    is a keto diet healthy

  3. what is the keto diet all about
    July 7, 2021 at 4:41 am

    keto zone diet food list

  4. dating sites for over 60's free
    June 26, 2021 at 1:57 am

    100% free dating sites no hidden fees

  5. free dating site search engine
    June 24, 2021 at 3:15 pm

    free christian dating sites with no hidden fees

  6. free chat dating sites
    June 24, 2021 at 12:57 pm

    free dating chat websites

  7. canada online dating site free
    June 23, 2021 at 11:07 pm

    free text dating sites

  8. free online dating sites uk
    June 2, 2021 at 11:37 am

    senior catholic dating for free

  9. dating sites without registering and free
    June 1, 2021 at 10:20 pm

    free dating sites in europe without payment

  10. single senior dating sites free
    June 1, 2021 at 8:39 pm

    free dating sim online

  11. senior dating sites over 50 free
    June 1, 2021 at 8:07 pm

    free dating co

  12. free henderson kentucky dating sites
    May 21, 2021 at 2:29 am

    polish dating free

  13. christian single dating free
    May 20, 2021 at 10:25 pm

    free trial dating service

  14. free dating without registering
    May 20, 2021 at 7:15 pm

    free muslim dating sites uk

  15. free easy dating sites
    May 20, 2021 at 4:32 am

    totally free dating sites for separated men

  16. free dating sites lexington ky
    May 20, 2021 at 3:49 am

    free lesbain dating site

  17. Tinder Romania
    May 16, 2021 at 3:26 pm

    Tinder Romania

    Linux 忘记密码解决方法 – rock funs

Meta
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Categories
  • game
  • linux
  • news
  • pics
  • proxmox
  • windows
Recent Posts
  • proxmox7.3直通显卡
  • Proxmox VE 直通显卡方案及解决N卡Code43
  • Linux系统出现:You have new mail in /var/spool/mail/root 的原因及解决办法
  • debian系统解决中文乱码
  • pve添加git和pvetools
Recent Comments
  • EdgarTot on proxmox7.3直通显卡
  • Ashvem on proxmox7.3直通显卡
  • Tedvem on proxmox7.3直通显卡
  • Jackvem on proxmox7.3直通显卡
  • Miavem on proxmox7.3直通显卡
Archives
  • March 2023 (1)
  • December 2022 (4)
  • November 2022 (6)
  • April 2022 (1)
  • February 2022 (5)
  • January 2022 (2)
  • December 2021 (3)
  • November 2021 (1)
  • October 2021 (2)
  • September 2021 (1)
  • August 2021 (1)
  • July 2021 (8)
  • June 2021 (14)
  • May 2021 (2)
  • April 2021 (2)
  • March 2021 (10)
  • January 2021 (4)
  • December 2020 (4)
  • November 2020 (13)
  • April 2020 (276)
  • March 2020 (1)
  • June 2019 (5)
  • May 2019 (10)
  • December 2015 (1)