如何在Alma Linux上安装和配置GNOME或KDE等桌面环境

Alma Linux上安装和配置GNOME或KDE等桌面环境,可以按照以下步骤进行:

如何在Alma Linux上安装和配置GNOME或KDE等桌面环境
(图片来源网络,侵删)

1、确保你的系统已经更新到最新版本,打开终端,输入以下命令:

sudo dnf update y

2、安装GNOME桌面环境:

如果你想要安装GNOME桌面环境,可以使用以下命令:

sudo dnf groupinstall "GNOME Desktop" y

3、安装KDE桌面环境:

如果你想要安装KDE桌面环境,可以使用以下命令:

sudo dnf groupinstall "KDE Plasma Workspaces" y

4、安装完成后,你需要选择一个默认的显示管理器,对于GNOME,你可以使用gdm,对于KDE,你可以使用sddm,使用以下命令安装相应的显示管理器:

对于GNOME:

sudo dnf install gdm y

对于KDE:

sudo dnf install sddm y

5、安装完成后,需要设置默认的显示管理器,使用以下命令:

sudo dnf install dnfpluginscore y

6、接下来,你需要编辑/etc/systemd/system/default.target文件,将multiuser.target替换为graphical.target,使用以下命令:

sudo vi /etc/systemd/system/default.target

7、在文件中,找到以下内容:

Default target
#
The default systemd target shall be used as the final boot target,
unless overridden at runtime with an appropriate command line argument.
See systemd.special(7) for further information.
#
Note: Set this to graphical.target instead of multiuser.target to enable
      access to graphical user sessions by default in addition to the terminal.
#
[Service]
ExecStart=/usr/lib/systemd/systemddefaultstartup
[Install]
WantedBy=multiuser.target

8、将[Install]部分的WantedBy=multiuser.target更改为WantedBy=graphical.target,对于GNOME,更改后的内容应为:

Default target
#
The default systemd target shall be used as the final boot target,
unless overridden at runtime with an appropriate command line argument.
See systemd.special(7) for further information.
#
Note: Set this to graphical.target instead of multiuser.target to enable
      access to graphical user sessions by default in addition to the terminal.
#
[Service]
ExecStart=/usr/lib/systemd/systemddefaultstartup
[Install]
WantedBy=graphical.target

9、保存并退出文件,重新生成systemd配置:

sudo systemctl daemonreload

10、重启计算机以应用更改:

sudo reboot

11、重启后,你应该会看到新的显示管理器(gdmsddm),并且默认进入图形界面,使用你的用户名和密码登录。

至此,你已经在Alma Linux上成功安装和配置了GNOME或KDE桌面环境,根据你选择的桌面环境,你可以享受不同的功能和外观,祝你在Alma Linux上的桌面体验愉快!

原创文章,作者:未希,如若转载,请注明出处:https://www.kdun.com/ask/538063.html

(0)
未希新媒体运营
上一篇 2024-04-29 16:06
下一篇 2024-04-29 16:09

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

云产品限时秒杀。精选云产品高防服务器,20M大带宽限量抢购  >>点击进入