Linux修改默认grub主题

概览:

下载Grub主题包

选择自己喜欢的主题包Grub主题

我选了这个 Grub-theme-stylishdark 的主题包

2.创建themes主题文件夹

  • !!!如果是第一次修改主题,系统默认不会有themes文件夹
  • So,要自己建立文件夹themes
    1
    sudo mkdir /boot/grub/themes

3.解压下载的主题

1
tar -xvf 主题包名 #像xxx.tar.xz

4.移动主题包到themes路径下

找到theme.txt文件,复制上一层文件夹(主题包文件)到系统主题文件夹

1
sudo cp 主题包名 /boot/grub/themes/

5.修改配置文件(/etc/default/grub)并更新

1
sudo subl /etc/default/grub
/etc/default/grub大致内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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_STYLE=hidden
#选择前等待时间(秒)
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# 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界面分辨率
GRUB_TERMINAL_OUTPUT=gfxterm

# 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=1920x1080

# 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"
#自定义主题路径
GRUB_THEME="/boot/grub/themes/StylishDark/theme.txt"

!!!注意
最后要更新GRUB配置

1
sudo update-grub2
------ 文章已经结束,谢谢你的阅读 ------
------ article has ended,thank you for reading ------
Thanks support Me

---------------- The End ----------------