Linux Single User Mode

简介: 1. Ubuntu a. 开机按 shift 进入GRUB In fact: "generic" or "recovery mode" whichever is OK! b. "e" c. ctrl+x or F10 d. poweroff but:  shell> reboot -f            /// You can make it!

1. Ubuntu

a. 开机按 shift 进入GRUB

In fact: "generic" or "recovery mode" whichever is OK!

b. "e"

c. ctrl+x or F10

d. poweroff

but:  shell> reboot -f            /// You can make it!

2. CentOS6

a. GRUB

b. "e" , 末尾输入:空格 1

c. "b"  boot



3. CentOS7




Boot your system in single user mode.

chroot your system

chroot /sysroot

reset the root password.

passwd

Update SELinux information.

touch /.autorelabel

Exit chroot

exit

Reboot your system.

reboot

Login with new password.

That’s All.




目录
相关文章
|
2月前
|
存储 安全 Linux
Linux卡在emergency mode怎么办?xfs_repair 命令轻松解决
Linux虚拟机遇紧急模式?别慌!多因磁盘挂载失败。本文教你通过日志定位问题,用`xfs_repair`等工具修复文件系统,三步快速恢复。掌握查日志、修磁盘、验重启,轻松应对紧急模式,保障系统稳定运行。
418 2
|
Linux Windows
Linux01---目录结构,Linux系统下只有一个最顶级的树/,Windows系统有盘符概念,而Linux系统没有盘符概念,整个系统都在/根目录下,Linux 系统写法 /user/local
Linux01---目录结构,Linux系统下只有一个最顶级的树/,Windows系统有盘符概念,而Linux系统没有盘符概念,整个系统都在/根目录下,Linux 系统写法 /user/local
|
关系型数据库 MySQL Linux
Linux登录mysql忘记密码Access denied for user ‘root‘@‘localhost‘ (using password: YES)错误
Linux登录mysql忘记密码Access denied for user ‘root‘@‘localhost‘ (using password: YES)错误
442 0
|
Unix Docker 容器
使用docker 启动naocs 报错出现:standard_init_linux.go:241: exec user process caused "exec format error"
```markdown Error in Docker container startup: "standard_init_linux.go:241: exec user process caused \"exec format error\"". Occurred at 2024-06-29 09:26:19.910, followed by a failed hook with a syslog delivery error at 09:27:20.193. Seeking solutions from experts. ```
|
Java Unix Linux
Linux系统之User CPU time解析
在Linux操作系统中,通常采用8个不同的指标来研究Unix / Linux操作系统中的CPU消耗:用户CPU时间(us)、系统CPU时间(sy)、良好的CPU时间(ni)、空闲CPU时间(id)、等待CPU时间(wa)、硬件中断CPU时间(hi),软件中断CPU时间(si),被盗CPU时间(st)。在本文中,我们主要对“用户CPU时间”进行解析。
938 0
|
Shell Linux
linux通过namespace技术实现user用户隔离的例子
在Linux中,可以使用namespace技术实现用户隔离。下面是一个简单的示例,演示如何使用namespace隔离用户。 1. 首先,我们可以创建一个新的用户和组。使用以下命令创建一个新用户和组: ```shell sudo useradd -m testuser ``` 这将创建一个名为testuser的新用户,并为其创建一个相应的用户目录。 2. 接下来,我们将在新的用户namespace中启动一个新的bash Shell。运行以下命令: ```shell sudo unshare -U /bin/bash ``` 该命令将创建一个新的用户namespace,并在该names
1081 0
|
Cloud Native Linux
linux、centOS虚拟机出现entering emergency mode解决方案
linux、centOS虚拟机出现entering emergency mode解决方案
linux、centOS虚拟机出现entering emergency mode解决方案
|
Linux 网络安全 KVM
[Linux] 磁盘挂载出错导致开机进入emergency mode
[Linux] 磁盘挂载出错导致开机进入emergency mode
829 0
|
缓存 Linux
Linux 的 top命令参数详解 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Linux 的 top命令参数详解 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1235 0
远程服务器Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (usin
远程服务器Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (usin