I am trying to understand the use of toe command.
From the man pages it's difficult for me to figure out what the command does.
Plus I cannot find any examples on the internet.

from the manpage:

toe - table of (terminfo) entries
[..] lists all available terminal types by primary name with descriptions

Can someone try to provide a simple explanation with examples?

  • IMHO, its only purpose is to squat a nice 3 letter command name that could've been used for something more useful ;-) – mosvy Jan 22 at 15:24

toe lists the terminal descriptions known to Terminfo on the system; by default it only lists descriptions stored in its default directory, rather than all the locations it knows about (e.g. /etc/terminfo on Debian-based systems), so


often produces no output. To see something useful, run

toe -ha

This will list all the Terminfo database entries, with a header showing where they come from:

$ toe -ha
hurd            The GNU Hurd console server
wsvt25m         NetBSD wscons in 25 line DEC VT220 mode with Meta
wsvt25          NetBSD wscons in 25 line DEC VT220 mode
linux           linux console


Each line starts with a value which can be used with the TERM variable so that Terminfo-compatible programs will use the corresponding terminal description. You might recognise xterm and its variants in the list...

  • 1
    Why would it default to something that doesn't specify anything? Historical reasons? – terdon Jan 22 at 14:05
  • 1
    I guess so. IIRC, admins used to copy useful entries to /etc/terminfo for speed reasons, so by listing only that, users saw what was relevant... – Stephen Kitt Jan 22 at 14:16
  • 1
    Take care with the /etc/terminfo default which is GNU/Linux-only; I've already been savaged for assuming it. – mosvy Jan 22 at 14:40
  • 1
    Thanks for the heads-up @mosvy! – Stephen Kitt Jan 22 at 14:42
  • /etc/terminfo is Debian-specific. Others have chosen differently, even considering just Linux operating systems alone. – JdeBP Jan 22 at 18:30

As mentionned in toe documentation (man 1 toe), it will list you the terminfo entries on the

toe(1)                      General Commands Manual                     toe(1)

       toe - table of (terminfo) entries

       toe [-v[n]] [-ahsuUV] file...

       With no options, toe lists all available terminal types by primary name
       with descriptions.   File  arguments  specify  the  directories  to  be
       scanned;  if  no such arguments are given, your default terminfo direc‐

For example, terminfo entries on my system are stored under /usr/share/terminfo :

$ toe /usr/share/terminfo/ |head -n 10
jaixterm-m  IBM Kanji AIXterm Monochrome Terminal Emulator
jaixterm    IBM Kanji Aixterm Terminal Eemulator
microb      micro bee series
mime        microterm mime1
megatek     pegasus workstation terminal emulator
m2-nam      France Telecom Minitel 2 mode te'le'informatique
mlterm+pcfkeys  fragment for PC-style fkeys
mgterm      MGL/MGL2 MobileGear Graphic Library
ms-vt100    MS telnet imitating dec vt100
mime2a-s    microterm mime2a (emulating an enhanced soroc iq120)

I limited the output... Now, for what terminfo is, just have a look to man 5 terminfo:

terminfo(5)                      File Formats                      terminfo(5)

       terminfo - terminal capability data base


       Terminfo  is  a data base describing terminals, used by screen-oriented
       programs   such   as   nvi(1),   rogue(1)   and   libraries   such   as
       ncurses(3NCURSES).  Terminfo describes terminals by giving a set of ca‐
       pabilities which they have, by specifying how to perform screen  opera‐
       tions,  and  by  specifying padding requirements and initialization se‐
       quences.  This describes ncurses version 6.1 (patch 20181013).

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.