IN-DEPTH Next-gen terminals
Next-gen terminals
Discover the next-gen terminal tools with David Rutland that will transform your command-line life.
For most Linux Format readers, the terminal is where the action happens. Sure, you probably chose your distro based on a mix of aesthetics and the tools with which it comes packaged, but when it comes down to it, most of the real work gets done on a black screen with a monospace font. .
Why? Linux is a command-line based system, and generally it’s a lot quicker and more efficient to type a line or two into BASH than it is to use a mouse to conjure a monolithic GUI from the depths of your SSD. The difference may well be seconds – and you could be using those seconds to get work done. Or to make a cup of tea. Terminals were never designed to be beautiful. Their output is often difficult to scan, and if there happens to be any non-Linux person lurking nearby with a tray of biscuits, there’s a very real danger that you’ll be arrested as a hacker in your local Starbucks.
We’re now in the third decade of the 21st century, and terminal tools don’t need to be ugly, and they don’t need to frighten passers-by, either.
It’s now easier than ever to be superproductive in the shell and to work efficiently, too. We’ve rounded up a few essential tools to replace or augment what we already use.
T
he cat command concatenates files and displays the output to your shell. It can work with all text-based files, and is simple to use. For instance, if you want to view the contents of three html files in your present working directory, you would type cat 1.html 2.html 3.html and the contents would be displayed for you.
Alternatively, you can use it to check the contents of just one file: cat 1.html . It’s simple, it’s fast and there’s no need to worry that you’ve accidentally made changes to any of the file contents because you didn’t open it. We’ve been using cat for years for everything from CSS style sheets to ebooks.
But it’s white text. Even if you have another colour selected to display the output, it’ll be uniformly that one colour. It’s difficult to read and to find what you’re looking for at a glance.
Did you put the correct closing tags on your HTML? You’ll need to pull on your glasses and count lines to find out, or fire up a GUI-based code editor, such as Brackets which has syntax highlighting. Or you could use bat, which first appeared in September 2020 and uses exactly the same syntax as cat. It has syntax highlighting built in and line numbers to help you orient yourself in a lengthy document of series of files.