小编Dav*_*ord的帖子

如何为linux shell设置TERM环境变量

当我在〜/ .bash_profile中设置导出TERM = xterm-256color时,我遇到了很奇怪的问题.当我尝试运行nano或emacs时,我收到以下错误.

纳米:

.rror opening terminal: xterm-256color
Run Code Online (Sandbox Code Playgroud)

emacs的:

 is not defined.type xterm-256color
If that is not the actual type of terminal you have,
use the Bourne shell command `TERM=... export TERM' (C-shell:
`setenv TERM ...') to specify the correct type.  It may be necessary
to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.
Run Code Online (Sandbox Code Playgroud)

如果我在shell中手动输入以下内容就可以了

export TERM=xterm-256color
Run Code Online (Sandbox Code Playgroud)

我很难过.

linux bash xterm

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

bash ×1

linux ×1

xterm ×1