Debian does not enable the graphical user interface by default.
Preface The Linux graphical interface is too resource-intensive. Running several virtual machines simultaneously feels overwhelming. It's time to disable the GUI on these Linux servers. CLI: Command Line Interface. Most modern Linux distributions default to a GUI login screen. If you try to modify the inittab file following older methods, you'll find it doesn't exist in newer versions (due to changes in Linux's boot service mechanisms). Modifying the Grub configuration file Open the gr
目录21 个章节
Preface
The Linux graphical interface is incredibly resource-intensive; running several virtual machines simultaneously feels overwhelming. Time to disable the graphical interface on all these Linux servers.
CLI: Command Line Interface.
Modern Linux distributions default almost entirely to a GUI login interface. Following older methods to modify theinittabfile won’t work on newer versions, as the Linux boot service mechanism has changed.
Modifying the GRUB Configuration File
Open the GRUB configuration file (Grub配置文件)
nano /etc/default/grub
Modify the following line
GRUB_CMDLINE_LINUX=”” to GRUB_CMDLINE_LINUX=”text”
Update GRUB (更新grub)
update-grub
Update the system service manager configuration (更新系统服务管理器配置)
systemctl set-default multi-user.target
Reboot (重启): init 6
If you change this file, run 'update-grub' afterwards to update.
/boot/grub/grub.cfg.
For full documentation of the options in this file, see: https://github.com/typescript-eslint/typescript-eslint/blob/main/docs/linting/configs.md
info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="text"
Uncomment to enable BadRAM filtering, modify to suit your needs
This works with Linux (no patch required) and with any kernel that obtains
The memory map information from GRUB (GNU Mach, kernel of FreeBSD …)
#GRUB_BADRAM=”0x01234567,0xfefefefe,0x89abcdef,0xefefefef”
Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
The resolution used on graphical terminal
Note that you can only use modes supported by your graphics card through VBE.
you can see them in real GRUB with the command `vbeinfo’
#GRUB_GFXMODE=640x480
Uncomment if you don't want GRUB to pass “root=UUID=xxx” parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
## Removing Debian Root User Login Restriction
Open the gdm configuration file:
```py
nano /etc/gdm3/deamon.conf
Configure security settings:
Add AllowRoot = ture on the next line under [security]
Remove gdm login username check:
Open the file /etc/pam.d/gdm-autologin and delete or comment out its related configuration information: auth required pam_succeed_if.so user != root quiet_success
The modified gdm-autologin file:
#%PAM-1.0
auth requisite pam_nologin.so
#auth required pam_succeed_if.so user != root quiet_success
auth required pam_permit.so
@include common-account
SELinux must be the first session rule. This ensures that any
It looks like the content you provided is already in English! There's no Chinese text to translate.
Did you mean to paste different content? Feel free to share the Chinese Markdown text you'd like translated, and I'll be happy to help.
The module may execute code in the wrong domain.
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
session required pam_loginuid.so
SELinux needs to intervene at login time to ensure that the process
starts in the proper default security context. Only sessions which are
Those intended to run in the user’s context should be run after this.
session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
session optional pam_keyinit.so force revoke
session required pam_limits.so
session required pam_env.so readenv=1
session required pam_env.so readenv=1 envfile=/etc/default/locale
@include common-session
@include common-password
_EOF_
Debian does not enable the graphical user interface by default.
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
在Manjaro上配置国内源
前言 之前我一直用官方源的,但是最近发现官方源变慢了,于是想要切换国内源,顺手做个笔记。 操作 使用以下命令,生成可用中国镜像站列表: sudo pacman-mirrors -i -c China -m rank 刷新完列表之后会弹出来一个框让你选择软件源,这里的就都是国内源了,选择一个喜欢的就行(当然要选择两个以上也没问题。) 日常桌面截图
2025-10-27 · 系统配置 · 约 1 分钟
Debian下SSH服务的安装与配置
https://cnzhx.net/blog/linux-server-ssh-key-auth-configuration/
2025-10-27 · 系统配置 · 约 1 分钟
关闭CentOS-6-防火墙,关闭Linux系统防火墙
前言 最近部署服务的时候需要临时关闭一下防火墙,所以记个笔记,如何关闭CentOS防火墙。 查看系统版本 输入:cat /etc/issue 查看版本 通过service关闭 service命令开启以及关闭防火墙为即时生效,下次重启机器的时候会自动复原。 查看防火墙状态: service iptables status 记得在CentOS6.9中是输入iptables,网上有些教程使用serv
2025-10-27 · 系统配置 · 约 1 分钟
linux配置sendmail发邮件服务
前言 因为开发需要,搞了个wiki系统,并且用到了邮件订阅,所以研究了一番发送邮件的方法。 安装 没什么好说的,先安装必要组件。 apt install sendmail-bin apt install sendmail apt install sendmail-cf #配置工具 配置sendmail sendmail默认是本机用户发送给本机,所以需要修改可以发送到整个Internet: 修改se
2025-10-27 · 系统配置 · 约 1 分钟
讨论
共 0 条加载评论中…