温馨提示×

centos minimal怎么装桌面

小樊
42
2026-09-21 01:44:32
栏目: 智能运维

在 CentOS Minimal(最小化安装) 上装桌面环境,一般有几种常见选择。下面以 CentOS 7 / 8 / Stream 为例说明(命令略有差异)。


一、先更新系统

yum update -y

(CentOS 8 / Stream 也可用 dnf)


二、安装桌面环境(选一个)

方案 1:GNOME 桌面(官方推荐,最常用)

yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -y

CentOS 8 / Stream:

dnf groupinstall "Server with GUI" -y

方案 2:KDE 桌面(更像 Windows)

yum groupinstall "KDE Plasma Workspaces" -y

方案 3:轻量桌面(Xfce,适合低配置)

yum install epel-release -y
yum groupinstall "Xfce" -y

三、设置默认启动为图形界面

systemctl set-default graphical.target

四、启动桌面

方式 1:重启

reboot

方式 2:不重启直接进图形

systemctl isolate graphical.target

五、首次登录

  • 重启后会出现 登录界面
  • 用户名 / 密码是你安装时设置的
  • 如果提示许可协议(CentOS 8),按提示接受即可

六、常见问题

1️⃣ 没有网络导致装不了

nmcli device status
nmcli connection up eth0

2️⃣ 想远程用桌面(可选)

yum install xrdp -y
systemctl enable xrdp
systemctl start xrdp

然后用 Windows 远程桌面连接。


如果你告诉我:

  • CentOS 版本(7 / 8 / Stream)
  • 物理机 / 虚拟机
  • 想要 GNOME 还是轻量桌面

我可以给你更精确的命令。

0 踩