Terminals are elegant, perceptibly simple, and remarkably efficient. Conceptually, they are little blank canvases that talk back when you paint them with words.
> echo "Hello, World."
Hello, World.
It all rests on the basis of input and output. Of course, one could argue that this is the case for any program on a computer, and that’s not wrong. However, there is something very special about the way this is done with text based input inside of a terminal. Working with a computer tends to be all about text manipulation after all, if you really stop to think about it. Data comes in, is transformed somehow, and output is received.
Any graphical, menu driven application is only a layer on top of the commands and code executed in the background. Even when you manipulate a graphical object, through a GUI(graphical user interface), behind the scenes you are simply changing characters inside a file. Therefore it follows that when you are “speaking” to a computer through the terminal, you are speaking in a language that more closely resembles its native language. And just as you do when you speak to a person in their native tongue, the computer also, understands you better, and you gain a deeper understanding of it, too.
If you’re closer to the machine, it naturally also follows that you will be more proficient while working with it.
The Canvas that Keeps On Giving
In a conversation between two people, it is considered common curtesy, and in many cases expected, that the exchange is evenly divided such that one person speaks for a set period on a given subject, then the other gives a response of equal length, relating back to the previous statement; all within the confines of the subject matter, until that too changes naturally. Of course, from time to time it so happens that you’re talking to a conversationalist. The rules of cordial communication then go out the proverbial window. This person dominates the flow of conversation; the balance is skewed towards one side of the party. You may be sat back, relaxed and all ears or you may be struggling just because you desperately want to get a word in edge wise; whatever the case, there is a clear misalignment.
Your terminal is your personal, perfect conversationalist. The canvas that keeps on giving. It will never interrupt you, in fact, you are the one to interrupt it. It will listen to anything you have to say, and follow your commands to the tee. Because that is exactly what it was programmed to do.
The relation between you and your terminal is such that it is naturally skewed towards doing most of the talking. This is a good thing, because when talking to your computer, the less you have to say, the better.
For most common operations, a two letter alias is desirable. Why? Because you’re going to remember what it does anyway, eventually. And when you do, you’ll want it to be as fast and efficient as possible. Take the ’ls’ command as a prime example. Why isn’t it called ’list’? It sounds short and sweet enough, but in practise, it’s a disaster. You’ve probably worked on the terminal before if you’re reading this—if not, welcome—and you’ve used the ls command many times. If it had instead been called list, we would effectively have to double the amount of effort you’ve ever put into that command. For most users of terminals, this would double the effort of thousands and thousands of inputs. Thats a lot of extra motions for no gain whatsoever.
Be concise and to the point. Use aliases and functions to save even more on typing, preferably according to a good system such as the XSM X-MODULES model: a system that defines common aliases according to the letters on your keyboard. Let the machine do most of the talking, it’s there to do the work you ask of it, so asking should be as smooth and out of the way as possible.
Why the Customized Terminal Wins the Day
Terminals are archaic, a little bit hard to understand, and their functionality tends to be very basic when you find them out in the wild. Navigation is a little slow: in many situations, you are forced to input long path names and type a lot of characters just to move from one location to another. Intimidation is not an uncommon feeling amongst newcomers, and it’s understandable. There are no buttons or menus, no hints to guide you and hold your hand as you learn, nothing but an indifferent ‘command not found’ message when you attempt to speak to it. There is only that blinking cursor and the blank, elegant canvas.
So why would anyone want to use a terminal to interact with the system? The answer lies in the modern, terminal emulator experience. These days there are no actual terminals anymore, instead software that emulate them is used.
They can all be configured to make the experience of using them better, which one you choose to use isn’t of much significance.
The big point of customization, is the configuration of the shell itself. This has to do with aliases and certain modes such as the vi mode for input which is more or less essential to turn on. It allows you to edit your commands as if you were editing a file in vim. That may not sound like much to the uninitialized, but it’s a very good thing. In XSM we use zsh as our shell to provide more functionality, like autocompletion and the ZLE line editor.
Next is Tmux. This piece of software is what’s called a terminal multiplexer. It’s used to setup a server that you connect to (locally if used on your local machine) giving you the ability to close the window and bring it back as if nothing happened. If used remotely you can use ssh to continue working from where you left off. This is all mostly a bonus though, because Tmux also allows you to create tabs and split windows, and multiple sessions, if needed.
This allows you to run multiple terminal applications in a single window. Something very important if most of what you do is on the terminal. Having all these things in the same window keeps your workspace uncluttered, promoting a cleaner, clearer way to handle your work on the computer.
The last point is to customize further using scripts and functions when possible. This cannot be understated, as automation when used in clever ways can save a lot of time and effort.
Using the Terminal for Almost Everything
Something XSM promotes is using the terminal whenever possible, to a reasonable extent. Browsing the web with a terminal is not recommended—in XSM we use qutebrowser—and doing any form of graphical design work is plain impossible. However, programs where text is the central component can almost always be represented as some form of command line application.
Wether it’s text editing, email, subscription feeds, programming, music players, terminal file managers, the list goes on, for a lot of the common programs that are needed frequently, there is usually a terminal client available. And a lot of the time, things can be done with great ease and effectiveness using such an approach.
The great winning concepts here are unification, standardization. The applications all look very similar, it’s simply text on a background. They are all gathered in the same window under different tabs, if you use Tmux, that is.
It does require the user to know which keys to press for what actions, this is true. Using a mouse, one doesn’t really have to know that much, aiming and clicking is all there is to it. There are no nuanced, precise choices to make. You must look, aim and click. On the contrary, in a terminal application, you use your keyboard for all these things. If the program is designed in a good way, you should be able to press a certain combination of keys and have the exact same thing happen, every single time. That’s reliable. You don’t even have to look at what you’re doing, practically. With practise it then becomes second nature to navigate and do the things you need to do within the program, all with the keys, without having to as much as stop and think about it.
Adjustment Period
The minimal, command line work flow is elegant, astonishingly beautiful, and ultimately gives you the freedom to automate and customize every aspect of your day to day operations. Compared to clicking through bulky programs so crammed with features and buttons that you feel overwhelmed just looking at it, it’s an obvious choice.
The downside is the steep learning curve. If all your previous experience working with computers is like most people’s: dealing with “normal” GUI applications, using the mouse heavily, and clicking and dragging files is second nature to you, it likely poses a challenge, and an adjustment period should be expected.
I don’t promote this way of using computers, in fact, I’ll be quick to say that it’s not for everyone. I do think it’s the best way to use a computer, overall, I will say that. It provides the most joy in the long run. And for anyone learning for the first time, I would recommend it.
To anyone else, if you’re patient and open minded, adapting the text based approach—as I’d like to call it—and switching over to the terminal might just change your life, and consequently, your perspective on computers—forever.
> echo "Hello, Computer."
Hello, this is the system speaking. When you say the magic words, its in my nature to give back as much as is needed, I could even go on talking forever. After all, it doesnt really matter to me.
Advent of Code RegEx Style