本文说明了如何在 CentOS/RHEL 8 上安装 GUI。
在安装过程中,在软件选择阶段没有选择此 GUI 包。
安装后,屏幕将引导至 CLI 提示符而不是 GUI。
当检查组列表中的可用环境组时,它仍然显示“Server with GUI”,如下例所示:
# dnf grouplist This system is receiving updates from Unbreakable Linux Network or Spacewalk. Last metadata expiration check: x:yy:zz ago on Mon xx Oct yyyy Available Environment Groups: Server with GUI ... ...
- 确保所有系统包都是最新的。
执行以下命令将系统更新到存储库中的最新版本:
# dnf update
- 执行以下操作以安装 GUI 环境。
# dnf groupinstall "Server with GUI"
以上将安装 GUI,否则默认情况下会安装到文本模式。
- 在系统启动时启用 GUI。
# systemctl set-default graphical.target
在 CentOS/RHEL 8 中,systemd 使用“目标”而不是运行级别。
- 发出以下命令以在系统启动时启用 GUI。
# ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
- 重新启动机器,它将启动进入 GUI。
# systemctl reboot
日期:2020-09-17 00:12:32 来源:oir作者:oir