🐧 Linux

Terminal vs GUI — a speed test

Twenty-five seconds of clicking against two seconds of typing — the same task.

5 min read
Terminal kontra GUI

A few years ago I had four hundred photographs to rename. They came off three different cameras, so the filenames were a mess of prefixes and inconsistent numbering, and they had to end up in one folder in chronological order. I did the first thirty by hand, watched the clock, and did the arithmetic on the remaining three hundred and seventy.

That is the entire argument for the terminal, and it has nothing to do with looking clever. Clicking is fine for one thing. It scales terribly to four hundred things, and it scales to nothing at all when the four hundred things need doing again next month.

The black window is a conversation, not a test

Most people's fear of the terminal comes from a misunderstanding of what it is. It looks like an exam. It is closer to a text message to the computer: you say what you want, it does it, and it tells you if it could not. That is the whole interaction.

The graphical interface and the terminal are not rivals, and the framing of "terminal versus GUI" is the wrong framing — which is worth saying on an article titled exactly that. They answer different questions. A graphical interface is a good answer to "what are my options?" — it shows you everything available, which is exactly what you need when you do not know what you are doing. The terminal is a good answer to "do this specific thing, to these specific files, right now" — it assumes you already know, and gets out of your way.

I use both, constantly, and the choice is not about skill. It is about how many things I am doing. One file: I click. Forty files: I type. That is the rule, and it took me years to state it that simply.

Where the time actually goes

Consider a task I get asked about often: find every invoice from last year in a folder tree, and copy them somewhere. By hand that is opening folders, reading names, checking dates, dragging files, losing your place, starting again. It is not difficult. It is just long, and it is the kind of long that makes mistakes — by file two hundred, attention is gone.

In a terminal it is one line. Not because the terminal is magic, but because you are describing the rule rather than performing the result. "Everything whose name contains this, modified in this period, from this folder downwards, goes there." The computer then does four hundred identical operations without getting bored, without skipping one, and without the two hundredth being worse than the first.

That last property is the one I care about professionally. I have spent years in data work, and the difference between clicking and describing is the difference between a result and a method. A result you have. A method you can repeat, check, hand to somebody else, and run again next year when the folder has changed. Anything I have to do twice, I write down as a command. Anything I have to do monthly, that command gets scheduled and I stop thinking about it.

The things that genuinely go wrong

I am not going to sell you the terminal without the sharp edges, because the sharp edges are real and people get hurt on them.

There is no undo. A graphical file manager moves deleted things to a bin and gives you a second chance. The terminal, asked to delete something, deletes it. This is not a design flaw — it is what you want when you are removing ten thousand temporary files — but it means a mistyped command can do real damage in under a second. Everyone who works this way has a story. Mine involved a directory I very much needed and a backup I was extremely glad existed.

The second trap is worse because it is social. Somebody on a forum posts a command, you paste it in, it works, and you have learned nothing except that pasting commands works. Then one day the pasted command does something you did not intend, and you have no model of why. If you take one habit from this article, make it this one: before running a command you do not understand, ask what each part of it does. Not out of caution theatre — out of the same instinct that stops you signing a document you have not read.

And a limit worth naming plainly: for a person who uses a computer for correspondence, documents and a browser, the terminal is not necessary and I will not pretend it is. On the machines I prepare for clients, nobody has to open it. I set them up so the terminal is available, not required. Insisting otherwise would be the same species of arrogance as telling someone their working laptop is finished.

Where to start, if you want to

Not with a course. With a real task you already have, small enough to fail safely.

Make a copy of a folder first. Then open the terminal and do something to the copy that you would normally do by hand — count the files in it, find the largest one, list everything modified this month. Those are all one-line questions, and the answers arrive instantly. Nothing is destroyed, nothing is at risk, and you have just had a conversation with your computer rather than an exam.

The second habit worth building early: when a command does something, ask it to tell you what it would do before it does it. Many tools have a mode for exactly this — describe the plan, change nothing. I use it constantly, and not because I am careful by nature. I use it because I have been the person who was sure and was wrong.

What is actually on the other side

The reason I keep encouraging people to look anyway is not efficiency. It is that the terminal is where a computer stops being a sealed appliance and becomes a machine you are operating.

A graphical interface can only offer you the operations somebody anticipated. If the person who designed that window did not think of your situation, your situation is not available. The terminal has no such ceiling: the parts combine, so you can build an operation nobody designed, because your problem is yours and nobody was thinking about it.

Ten commands cover the overwhelming majority of what anyone needs: move around, list, copy, move, delete, search, read a file, chain two things together, run something as an administrator, and ask for help on any of the above. That is an evening of learning, and it does not expire. The commands I learned fifteen years ago still work, on every machine I touch, including servers I will never see. Very little else in this industry can make that claim.

The four hundred photographs took one line and a few seconds. The thirty I did by hand first were not wasted, though — they are why I know the number. Measure first, then decide. It works for renaming files and it works for most other arguments too.

Want Linux on your desk, not just on the screen?

We ship refurbished Dell OptiPlex computers with Linux Mint already installed, updated and ready to work — keyboard and mouse included. In and around Białystok we bring it over and set it up on site. Or send us the machine you already own and we will do the same to that one.