Depends on the shell. Which login shell are you using?How do I globally set TERM=xterm-256color?
/.cshrc or /.profile
Users added with adduser(8) have /bin/sh as default. To make sure runWhatever is the default....
echo $SHELL
.export TERM=xterm-256color
in /etc/profile.setenv TERM xterm-256color
in /etc/csh.cshrc cap_mkdb /etc/login.conf
In case it's csh(1):setenv TERM xterm-256colors
in /etc/csh.cshrc
% echo $0
/bin/tcsh
% bash
[grahamperrin@mowa219-gjp4-8570p-freebsd ~]$ eval `tset -Q -s -m xterm:xterm-256color`
bash: setenv: command not found
[grahamperrin@mowa219-gjp4-8570p-freebsd ~]$ echo $0
bash
[grahamperrin@mowa219-gjp4-8570p-freebsd ~]$ echo $SHELL
/bin/tcsh
[grahamperrin@mowa219-gjp4-8570p-freebsd ~]$ exit
exit
%
Globally ?How do I globally set TERM=xterm-256color?
ttyv0 "/usr/libexec/getty Pc" xterm-256color onifexists secure
alias ls='ls --color'
Do you use .Xresources to config xterm? You can define him there. (XTerm.termName: xterm-256color
), or add the following lines in your .(shell)rc file:
e.g.
Code:case "$TERM" in 'xterm') TERM=xterm-256color;; 'urxvt') TERM=rxvt-unicode-256color;; 'Eterm') TERM=Eterm-256color;; esac
switch ($TERM)
case "xterm" :
set TERM=xterm-256color
breaksw
case "urxvt" :
set TERM=rxvt-unicode-256color
breaksw
case "Eterm" :
set TERM=Eterm-256color
breaksw
endsw