# 从命令行切换到桌面环境

startx

# 获取当前启动模式

systemctl get-default

# 修改启动模式为图形化

systemctl set-default graphical.target

# 修改启动模式为命令行

systemctl set-default multi-user.target

# 修改配置文件

vi /etc/gdm/custom.conf

# 增加如下配置

[daemon]

AutomaticLoginEnable=True

AutomaticLogin=root