一、破解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配置文件,查看其提示即可。
[[email protected] ~]# 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 # [[email protected] ~]#
2、命令行输入命令或自行创建软连接即可。
图示:
时间: 2024-10-09 06:33:34