46

I tried vt100, vt102, vt220, and xterm by using top.

But I can't find their difference. Is there any other term type? What's their difference?

61

xterm is supposed to be a superset of vt220, in other words it's like vt220 but has more features. For example, xterm usually supports colors, but vt220 doesn't. You can test this by pressing z inside top.

In the same way, vt220 has more features than vt100. For example, vt100 doesn't seem to support F11 and F12.

Compare their features and escape sequences that your system thinks they have by running infocmp <term type 1> <term type 2>, e.g. infocmp vt100 vt220.

The full list varies from system to system. You should be able to get the list using toe, toe /usr/share/terminfo, or find ${TERMINFO:-/usr/share/terminfo}. If none of those work, you could also look at ncurses' terminfo.src, which is where most distributions get the data from these days.

But unless your terminal looks like this or this, there's only a few others you might want to use:

  • xterm-color - if you're on an older system and colors don't work
  • putty, konsole, Eterm, rxvt, gnome, etc. - if you're running an XTerm emulator and some of the function keys, Backspace, Delete, Home, and End don't work properly
  • screen - if running inside GNU screen (or tmux)
  • linux - when logging in via a Linux console (e.g. Ctrl+Alt+F1)
  • dumb - when everything is broken
  • 1
    Is that the full list of terminal type? Thank you~ – sam Jul 25 '12 at 16:28
  • 6
    @sam No, this isn't the full list. These are common ones. Anyone can invent a new terminal type, in principle. You can see what terminal types are available on your system by running ls /lib/terminfo/* /usr/share/terminfo/* (these are the paths on Debian, other distributions may have slightly different paths). Most of them are highly exotic. – Gilles Jul 25 '12 at 23:10
  • 2
    for a explanation of the codes have a look at: docs.intersystems.com/ens20152/csp/docbook/… – A. Binzxxxxxx Apr 7 '16 at 9:38
  • 1
    vt220 supports colours! I had one with orange on black! ;-) Sorry. – Kusalananda Nov 7 '18 at 11:23
  • @Kusalananda The first one having colors was vt241... All the vt220 you can find are white, green or orange, depending on the phosphors used... – ingroxd Jan 5 at 22:39
10

Run infocmp wihtout any argument will give you all available xterm alternatives:

$> infocmp
xterm|xterm-debian|X11 terminal emulator,
    am, bce, km, mc5i, mir, msgr, npc, xenl,
    colors#8, cols#80, it#8, lines#24, pairs#64,
    ...

For more info check

$> ls /lib/terminfo/x/
xterm         xterm-256color  xterm-color     xterm-debian    xterm-mono
xterm-r5      xterm-r6        xterm-vt220     xterm-xfree86
  • Did Mac OS have the terminfo directory? – zx1986 Apr 9 '16 at 16:11
  • 4
    this answer is not right. running infocmp without argument gives you the settings for the active terminal. to list the other terminals you use toe – Steven Penny Jan 1 '18 at 14:17
  • 1
    @zx1986 there is /usr/share/terminfo directory on a macOS. – Mr. Tao Nov 4 '18 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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