天天看點

安裝GNOME3桌面并設定開機啟動圖形界面

本篇文章介紹如何在CentOS8 Linux作業系統中安裝GNOME3桌面環境和GDM(GNOME Display Manager)現實環境管理器。

環境

CentOS8 Minimal

安裝GNOME3

首先列出網絡源中可以使用的Groups:

[root@localhost ~]# yum grouplist

CentOS8安裝GNOME3桌面并設定開機啟動圖形界面CentOS8安裝GNOME3桌面并設定開機啟動圖形界面

下一步我們需要“Available Environment Groups”下面的“Server with GUI”,這個“Server with GUI”環境包使用的桌面環境就是GNOME3。下面進行安裝,下載下傳大約1GB的安裝包:

[root@localhost ~]# yum groupinstall "Server with GUI"

安裝完成!

設定GDM開機啟動

檢視gdm.service是否啟動,發現gdm服務沒有啟動。

[root@localhost ~]# systemctl status gdm

● gdm.service - GNOME Display Manager

Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: enabled)

Active: inactive (dead)

下面設定gdm開機啟動,并立即啟動該服務:

[root@localhost ~]# systemctl enable gdm --now

設定系統啟動級别為graphical

預設情況,CentOS8預設啟動級别為multi-user.target。

[root@localhost ~]# systemctl get-default

multi-user.target

下面設定CentOS8的啟動級别為graphical.target

[root@localhost ~]# systemctl set-default graphical.target

Removed /etc/systemd/system/default.target.

Created symlink /etc/systemd/system/default.target ¡ú /usr/lib/systemd/system/graphical.target.

[root@localhost ~]# systemctl get-default

graphical.target

進入GNOME3桌面

設定完上面的配置之後,重新開機作業系統。進入歡迎界面:

總結

繼續閱讀