TUI environment for Linux
Contrary to Windows, on GNU/Linux, there are a lot of command-line and TUI programs.
I still decided to enlist those that I use commonly, and some that I’ve found recently to be used on a TTY.
The structure of those notes is similar to the Windows one.
file and archive manager
There is Midnight Commander, and more modern/"younger" alternatives like nnn or ranger.
file viewer and pagers
For viewing textual files, a text editor, a program like cat, bat, or less is more than enough.
For other formats, it might be possible to convert them to text and view the converted document, but for some formats, specialized viewers can do a better job.
It is possible to view images in the terminal, although it depends on what terminal one is using 🗄️.
Source code management
For git repositories, there is tig.
Even if it is possible to create new commits, I use it mainly for inspecting the history and stash.
Disk usage analyzer
ncdu works extremely well.
Terminal multiplexer
There are simpler programs that, when combined, can provide the same functionality.
For example, dtach provides persistence, and dvtm provides window management.
In theory, this approach is better, because using dtach alone permits taking advantage of all features supported by the terminal emulator, while tmux(and screen, and dvtm) act as window managers in the shell/as terminal emulators, and need to reimplement a lot of things.
The main pain point I have with tmux is support for sixels; it does not work well.
Thus, sometimes I just want persistence (provided by dtach, tmux, screen), and (ab)use the features supported by the terminal emulator.
Unfortunately, it seems that tmux provides a better experience.
My main issue was that the state of Tui programs broke too easily with dtach.
For those reasons, I’m currently sticking with tmux.
Note that there is a fork of tmux that adds at least partial image support also for those terminals that do not support it, although I’ve never tried it.
Network manager
Network Manager 🗄️ also has a command line interface (nmtui).
Non-TUI programs
The trigger for writing down a list of TUI programs similar to Windows was using a laptop without a graphical desktop environment.
The programs listed here might not be TUI programs, but simple command-line programs. I decided to add them either because there is no TUI equivalent or because they improve the overall experience.
kmscon
Some of the biggest differences between working directly from the tty and from a terminal emulator are
the ability to change the font size
scroll
mouse clicks
select and paste with middle button
kmscon adds those feature back; font size can be changed for example with Ctrl followed by + or -
Although not a TUI program, this improves the experience of all command-line programs executed from a tty, TUI programs included.
Sixels are unfortunately not supported 🗄️.
pmount
Normally, I handle external drives with the graphical file manager; point-and-click, and the drive is mounted (or unmounted).
On remote systems, I never had the necessity of mounting an external drive "on the fly", so I never searched for possible solutions.
pmount is not a TUI program, but I found none that accomplishes a similar job.
screen locking
There are two choices.
The first is vlock, which does not work correctly when invoked inside tmux, as it only locks the current pane.
It works "correctly" when configured as lock-command in tmux, as it is executed outside of it:
set -g lock-command vlock
set -g lock-after-time 600 # value in seconds; 0 = never
bind L lock-session # prefix + uppercase LA more modern alternative is physlock, but it always asks for the root password 🗄️.
This issue has been fixed upstream, but there have been no new official releases with the fix, and the project does not seem to be maintained anymore.
timeshift
Not a TUI, but the command-line tool can be used interactively. It’s a shame that the application always depends on some graphical libraries 🗄️, but it is really practical for system backups.
If you have questions, comments, or found typos, the notes are not clear, or there are some errors; then just contact me.