Linux – List supported terminal types

linuxsolaristerminalterminfounix

Is there a portable way to list supported terminal types on all NX systems?

If not, what's the best way to get this list on Solaris?

Best Answer

On most systems, you can look for files under /usr/share/terminfo. On some versions of Solaris that may be /usr/lib/terminfo instead. Some system will also have a termcap file, which may be in /etc. /usr/share, or occasionally /usr/share/misc; the terminal names in that are in lines matching ^[^\t].*|, and every name between |s is a valid terminal name. (Technically the first 2-character entry is also valid, but in practice unused; it's left over from a tty driver hack for 6th Research Edition UNIX. Some termcap parsers may also accept the long description, but many won't.).

The definitive answer for any system will be in termcap(5) and/or terminfo(5).