Debian配置默认不开启图形界面
前言 Linux的图形界面实在是太耗资源了,同时开几个虚拟机感觉已经hold不住了,赶紧把这些Linux服务器的图形界面都关掉。 CLI:command Line Interface,命令行界面。 现在的Linux发行版默认登陆界面几乎都是默认为GUI界面,如果按照旧版本的修改inittab文件,在一些比较新的版本是没有这个文件的(Linux的启动服务机制发生改变) 修改Grub配置文件 打开gr
目录3 个章节
前言
Linux的图形界面实在是太耗资源了,同时开几个虚拟机感觉已经hold不住了,赶紧把这些Linux服务器的图形界面都关掉。
CLI:command Line Interface,命令行界面。 现在的Linux发行版默认登陆界面几乎都是默认为GUI界面,如果按照旧版本的修改inittab文件,在一些比较新的版本是没有这个文件的(Linux的启动服务机制发生改变)
修改Grub配置文件
打开grup配置文件
nano /etc/default/grub
修改
GRUB_CMDLINE_LINUX=”” 为GRUB_CMDLINE_LINUX=”text”
更新grub
update-grub
更新系统服务管理器配置
systemctl set-default multi-user.target
重启: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:
# 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 use only modes which your graphic card supports via 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”
解除debian root用户登陆限制
打开gdm配置文件:
nano /etc/gdm3/deamon.conf
配置安全设置:
[security] 下一行添加 AllowRoot = ture
去除gdm登陆用户名检测:
打开文件 /etc/pam.d/gdm-autologin,并其相关配置信息删除或注释掉:auth required pam_succeed_if.so user != root quiet_success
修改后的gdm-autologin文件:
#%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 needs to be the first session rule. This ensures that any
# lingering context has been cleared. Without this it is possible
# that a module could 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
# 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配置默认不开启图形界面
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
在Manjaro上配置国内源
前言 之前我一直用官方源的,但是最近发现官方源变慢了,于是想要切换国内源,顺手做个笔记。 操作 使用以下命令,生成可用中国镜像站列表: sudo pacman-mirrors -i -c China -m rank 刷新完列表之后会弹出来一个框让你选择软件源,这里的就都是国内源了,选择一个喜欢的就行(当然要选择两个以上也没问题。) 日常桌面截图
2025-10-27 · 系统配置 · 约 1 分钟
Ubuntu-18-04-修改登录界面背景图
前言 Ubuntu 18.04用了一段时间了,在Gnome桌面的加持下,兔子 18.04 的颜值还不错,加上自己搭配了几套GTK主题,简直美滋滋,唯一美中不足的就是,Ubuntu的登录管理器换成GDM之后,登录界面背景没办法修改了,这怎么行呢,于是经过一番折腾,有了本文。 首先,准备一张图片 图片的尺寸呢,根据你的屏幕分辨率确定咯。 然后把图片放到/usr/share/backgrounds/目录
2025-10-27 · 系统配置 · 约 1 分钟
配置MariaDB数据库服务端远程访问
操作步骤 开启远程访问权限 连接MariaDB数据库,执行以下命令开启远程访问。 grant all privileges on *.* to 'root'@'192.168.248.248' identified by 'password'; flush privileges; 如果需要任意IP地址访问,就把IP地址换成%。 修改配置文件 在网络上能搜索到的资料都只说了第一点,然而亲测之后并没有
2025-10-27 · 系统配置 · 约 1 分钟
服务器时间漂移,如何开启Linux NTP自动同步
本文记录了作者在服务器运维中发现时间漂移问题,并通过启用NTP同步、使用Chrony等工具进行排查与解决的全过程。文章强调了NTP同步的重要性,介绍了排查思路和高效工具的使用,以及如何同步硬件时钟(RTC),为服务器时间精准同步提供了解决方案。
2025-10-27 · 系统配置 · 约 1 分钟
讨论
共 0 条加载评论中…