CentOS中怎么设置终端显示字符界面区域的大小
在CentOS中设置终端显示字符界面区域的大小,可以通过修改终端的配置文件来实现。
一般来说,CentOS的终端配置文件是位于/etc/profile.d/目录下的/etc/profile.d/color.sh文件,我们可以使用文本编辑器编辑它来修改终端的字符界面区域的大小。
首先,打开/etc/profile.d/color.sh文件,找到下面这行代码:
if [ "$PS1" ]; then if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already sets the default PS1. # PS1='\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi接着,在上面的代码后面添加以下代码:
# 设置终端字符界面区域的大小 COLUMNS=80 LINES=25上面的代码表示将终端字符界面区域的列数设置为80,行数设置为25。 修改完毕后,保存文件,重新启动终端,即可使更改生效。
相关文章