Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Using the command echo $TERM, I get the output 'xterm'. However, I have not done anything to install the X Windowing System, and as far as I know, Xterm cannot run without it, and Arch does not install it by default. (Furthermore, there isn't any manpage on xterm, and I would think that if I actually had xterm installed, it would have a manpage).

So is the default terminal for Arch Linux really Xterm? If so, how is it running without X? If not, why does the $TERM variable contain 'xterm', and what is the default terminal?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

When you log in to the console without X11, you are using the Linux built-in "virtual console". It's built into the kernel and its terminfo name is linux, which is what you should be seeing in $TERM.

If your $TERM has anything else, carefully check your configuration, including:

  • the agetty lines in /etc/inittab (they should say linux at the end1)
  • system-wide shell startup scripts
    • /etc/profile, /etc/profile.d/*.sh
    • /etc/bash.bashrc (if using bash)
  • your own shell startup scripts
    • ~/.profile, ~/.bash_profile, ~/.bash_login, ~/.bashrc

1 Certain Arch Wiki pages suggest configuring agetty in inittab to use xterm or even xterm-256color. This is plain nonsense and whoever added that is an idiot.

share|improve this answer
    
Could you elaborate on that last part? –  Daniel Beck Nov 26 '11 at 14:06
    
Which part are you referring to -- "your own shell startup" or "Arch Wiki"? –  grawity Nov 26 '11 at 14:13
    
When googling for an example of Arch's inittab (being away from my own system), I found the Arch Wiki page on "Init and inittab", which has such examples in it (agetty being told to use "xterm-256color" as the terminal name) without sufficient explanation as to why it should be done like that. Not only this configuration is incorrect and cannot add any new features (such as more colors) to the Linux tty, it can even break programs expecting to be able to use Xterm-specific commands, as other users blindly trust and copy-paste the Wiki examples... –  grawity Nov 26 '11 at 15:26
    
(also: I am sorry for the personal attack.) –  grawity Nov 26 '11 at 15:27
    
Ah right now I understand what you mean. It'd configure the Linux virtual console to pretend to be xterm, with negative side effects in everything checking e.g. Term env variable or Termcap –  Daniel Beck Nov 26 '11 at 15:33
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.