Skip to content
页面导航

服务器运维命令

超算服务器不需要图形界面,直接使用命令行进行操作和管理。以下是一些常用的服务器运维命令,关闭图形界面提升性能。

我喜欢使用

# 切换到多用户模式(无图形界面)
sudo systemctl isolate multi-user.target

# 如果需要切回图形界面
sudo systemctl isolate graphical.targe

方法1:停止 GDM 服务(推荐)

bash

sudo systemctl stop gdm

这会立即停止图形界面,并返回到命令行登录界面(你当前的 vt2 可能会黑屏并切换到其他虚拟终端)。

方法2:禁用 GDM 开机自启(永久关闭)

bash

# 停止当前图形界面
sudo systemctl stop gdm

# 禁用开机自启
sudo systemctl disable gdm

# 如果需要重新启用图形界面
sudo systemctl start gdm

重启后系统将直接进入命令行模式。

方法3:临时切换到其他运行级别

bash

# 切换到多用户模式(无图形界面)
sudo systemctl isolate multi-user.target

# 如果需要切回图形界面
sudo systemctl isolate graphical.target