I have read a lot of articles and SE questions regarding how and where the default $TERM
environmental variable gets set.
Unfortunately in Debian 8.1 I can't seem to find where the default $TERM
variable is set when logging in to the system from tty1
.
I would love to be pointed in the right direction if this is indeed a duplicate question but the following questions didn't seem like they provided an answer:
tmux, TERM and 256 colours support
Where does the TERM environment variable default get set?
Is it correct to set the $TERM variable manually?
Edit
When I log in via tty1
here is what $TERM
is set to:
$> echo $TERM
linux
Listing of /usr/lib/systemd/
, note that there is no system
directory here.
$> ls -al
total 28
drwxr-xr-x 7 root root 4096 Aug 19 13:37 .
drwxr-xr-x 44 root root 4096 Aug 20 14:28 ..
drwxr-xr-x 2 root root 4096 Aug 19 13:37 catalog
drwxr-xr-x 2 root root 4096 May 26 02:07 network
drwxr-xr-x 2 root root 4096 Aug 19 13:37 ntp-units.d
drwxr-xr-x 2 root root 4096 Aug 19 13:37 user
drwxr-xr-x 2 root root 4096 May 26 02:07 user-generators
Best Answer
I suppose
TERM
is set tolinux
for the init process (pid 1) by Linux kernel here and there. You can see it in/proc/1/environ
(sorry the following output is from Ubuntu 15.04):On Debian/Ubuntu systemd based systems it gets propagated to child getty processes by definitions in
/lib/systemd/system/getty@.service
.So you might be able to override
TERM
in the kernel command line. Try to edit/etc/default/grub
and runupdate-grub
and reboot.