首页 > 其他 > 详细

1.13-1.16学习笔记

时间:2018-07-18 16:45:59      阅读:204      评论:0      收藏:0      [点我收藏+]
1.13 单用户模式
1、忘记root的密码怎么办
a、重启linux
reboot / init 6/ shutdown -r now
关机 init 0 /poweroff

1 make the command "init 6” to reboot the Centos system,and then click Centos, click button “e" to modify the grub mode
2 change ro to rw, add “init= /sysroot/bin/sh"

see image as below

2 chroot 命令用来在指定的根目录下运行指令。chroot,即change root directory(更改root目录)。在Linux系统中,系统默认的目录结构都是以/,即是以根(root)开始的。而在使用chroot之后,系统的目录结构将以指定的位置作为/位置
chroot /sysroot/

see image as below

3 passwd root
exit blank as below is
技术分享图片
使用LANG = en 密码出现乱码,需要把语言调整英文

在登录系统之前,必须完成这条命令,否则没办法登录系统
touch / .autorelabel

1.13-1.16学习笔记

原文:http://blog.51cto.com/12613274/2146834

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!