一、破解root密码
1、启动时任意键暂停启动
2、按e键进入编辑模式
3、将光标移动linux16开始的行,添加内核参数rd.break
4、按ctrl-x启动,输入如下命令
mount –o remount,rw /sysroot
chroot /sysroot
passwd root
touch /.autorelabel #创建label标签
图示:
二、图形界面及其字符界面切换
1、查看/etc/inittab配置文件,查看其提示即可。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[root@centos7 ~]
# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3
# graphical.target: analogous to runlevel 5
#
# To view current default target, run:
# systemctl get-default
#
# To set a default target, run:
# systemctl set-default TARGET.target
#
[root@centos7 ~]
#
|
2、命令行输入命令或自行创建软连接即可。
图示:
本文转自chengong1013 51CTO博客,原文链接:http://blog.51cto.com/purify/1854660,如需转载请自行联系原作者