CentOS 10在文本控制台模式下修改字体大小
临时设置字体 - setfont
帮助文档
setfont --help
[lwj@192 ~]$ setfont --help
Usage: setfont [write-options] [-<N>] [newfont..] [-m consolemap] [-u unicodemap]write-options (take place before file loading):-o <filename> Write current font to <filename>-O <filename> Write current font and unicode map to <filename>-om <filename> Write current consolemap to <filename>-ou <filename> Write current unicodemap to <filename>
If no newfont and no -[o|O|om|ou|m|u] option is given,
a default font is loaded:setfont Load font "default[.gz]"setfont -<N> Load font "default8x<N>[.gz]"
The -<N> option selects a font from a codepage that contains three fonts:setfont -{8|14|16} codepage.cp[.gz] Load 8x<N> font from codepage.cp
Explicitly (with -m or -u) or implicitly (in the fontfile) given mappings
will be loaded and, in the case of consolemaps, activated.-h<N> (no space) Override font height.-d Double size of font horizontally and vertically.-m <fn> Load console screen map.-u <fn> Load font unicode map.-m none Suppress loading and activation of a screen map.-u none Suppress loading of a unicode map.-v Be verbose.-C <cons> Indicate console device to be used.-V Print version and exit.
Files are loaded from the current directory or /usr/lib/kbd/*/.
查看所有字体
ls /usr/lib/kbd/consolefonts/
修改字体
参考上面目录查到的字体列表
setfont solar24x32
恢复默认字体
setfont
放大一倍字体
setfont -d
永久保留字体
要在系统重启过程中保留所选字体,请在 /etc/vconsole.conf
文件中使用 FONT
变量。
vim /etc/vconsole.confKEYMAP="us"
FONT="eurlatgr" //字体参考/usr/lib/kbd/consolefonts/目录下的字体文件