
tack Command in Linux
The tack command in Linux is a terminfo action checker. It is a diagnostic tool used for testing and verifying the correctness of terminfo entries, which describe how different terminals behave.
The tack command is essential for testing and developing terminfo entries, especially for terminal capabilities.
Table of Contents
Here is a comprehensive guide to the options available with the tack command â
- Installation of tack Command in Linux
- Syntax of tack Command
- tack Command Options
- Examples of tack Command in Linux
Installation of tack Command in Linux
To install the tack in Ubuntu, Kali Linux, Raspberry Pi OS, Debian, and other Debian-based distributions, use the following command −
sudo apt install tack
To install the tack on Fedora, use the following command −
sudo dnf install tack
To verify the installation of the tack command, check its version −
pcscd -V

Syntax of tack Command
The syntax of the tack command in Linux is as follows −
tack [options] [term]
In the above syntax, the [options] field is used to specify optional flags that modify how the tack behaves. The [term] field is the terminal type to test; it defaults to the value of $TERM if not specified.
tack Command Options
The options of the tack command are listed below −
Option | Description |
---|---|
-i | Inhibit terminal initialization. Prevents sending reset/init strings at startup. |
-t | Override basic terminal functions. Translates terminfo capabilities to ASCII equivalents. |
-V | Display version and exit. |
term | Terminal name to test. Defaults to $TERM if not provided. |
Examples of tack Command in Linux
This section explores how to use the tack command in Linux with examples −
- Running tack Command to Test and Interact with Terminfo Database
- Testing a Specific Terminal
- Suppressing Terminal Initialization
- Overriding the Basic Terminal Capabilities
Running tack Command to Test and Interact with Terminfo Database
To test and interact with the terminfo database, use the tack command −
tack
It initializes the session with the (rs2) prompt, indicating a terminal reset test. It then tests initialization behavior.

Next, the command displays the default terminal info, escape sequences, terminal size, and menu to display further details, as shown in the image below −

To display the basic information of the default terminal, press b −

Similarly, a brief description of the other menu items is listed below −
Menu Item | Description | Action |
---|---|---|
b) | Display basic information | Displays basic details about the terminal and its capabilities. |
m) | Change modes | Allows switching between different modes (testing different terminal features). |
t) | Tools | Opens the tools section to perform various terminal tests (cursor movement, color testing). |
n) | Begin testing | Starts an active testing session to interactively test the terminal's capabilities. |
l) | Start logging | Begins logging the results of the test sessions to a file. |
q) | Quit | Exits the tack program. |
?) | Help | Displays help information about how to use tack. |
Testing a Specific Terminal
To test the terminfo entry of a specific terminal, use the tack command with the terminal name. For example, to test the rxvt, use the following command −
tack rxvt
To list all installed terminfo entries, use the following command −
ls /usr/share/terminfo/
Here are some common terminfo entries −
xterm-256color | Provides 256 color support for the xterm terminal. |
xterm | Standard xterm terminal with 16 colors. |
linux | Represents the Linux console (virtual terminals) |
screen | For use with the GNU Screen terminal multiplexer. |
tmux | For use with the tmux terminal multiplexer. |
vt100 | Classic VT100 terminal (basic ANSI support). |
rxvt | Terminal emulator based on xterm with some differences. |
ansi | Basic ANSI-compatible terminal with minimal features. |
Suppressing Terminal Initialization
To suppress the terminal initialization, use the -i option. This starts tack without sending reset and init strings to the terminal −
tack -i
Overriding the Basic Terminal Capabilities
To override the basic terminal capabilities, such as cud1 to \n, cub1 to \b, and other directly to ASCII sequences, use the -t option with the tack command −
tack -t
Conclusion
The tack command in Linux is a helpful tool used to test and develop terminfo entries, which describe how different terminals function. It assists in verifying terminal capabilities by providing interactive options for testing features like cursor movement, colors, and more.
The tack command supports various options to modify its behavior, including suppressing terminal initialization or translating terminfo capabilities to ASCII.
In this tutorial, we covered the tack command, its installation, syntax, options, and usage in Linux with examples.