Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
1  
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
1  
Alright, I feel like a complete moron--the $TERM on my arch linux computer is 'linux'; however, I've been accessing the computer via ssh (the keyboard is busted, I just used my desktop keyboard, which happens to be a USB keyboard, to do). I had no idea that ssh would use a diff terminal than the one the computer was using, though it seems pretty obvious now. Sorry for that. – Anachrome Nov 26 '11 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .