Best of ECT News


Is It Time for the Command Line to Ride Into the Sunset?

This story was originally published on June 28, 2012, and is brought to you today as part of our Best of ECT News series.

There are many topics that tend to come up in a recurring manner around water coolers throughout the Linux blogosphere, and not just the great “Year of” debate, either.

No indeed, another shining example more than a little familiar to most of us who spend any time here is the much-abused command line — specifically, whether it’s outlived its usefulness in this era of the GUI.

Well guess what? The debate is back!

Trusty or Crusty?

That’s right — “Is the command line a crusty old relic?” was the name of the Open Ballot posted recently by the excellent team over at TuxRadar, and the conversation hasn’t died down since.

So what shall it be? Has the command line interface outlived its usefulness? Or is there still a place for this trusty old tool?

Linux bloggers haven’t held back expressing their opinions.

Pretty vs. Powerful

“The Command Line is far from being a crusty old relic,” opined Google+ blogger Linux Rants, for example. “It still holds more power and versatility than can be found in any GUI on the planet.”

It’s true that “GUIs are pretty and have great eye candy,” Linux Rants conceded. “They make computers easy to use for people that don’t want to actually get to know their computer, but they hold only a fraction of the power that you can get from a command line.”

GUIs are also significantly slower to use, he added: “Just the simple task of separating two kinds of files from a single directory, ‘mkdir GIF;mkdir JPG;mv *.gif ./GIF;mv *.jpg ./JPG’ and I’m done — five seconds to accomplish that. How long would it take in a pretty looking GUI?”

Long Live the CLI

Indeed, “as soon as someone shows me a way to efficiently construct a for-next loop in the GUI that lets me manipulate a series of files in a particular set of ways, I’m there,” agreed Hyperlogos blogger Martin Espinoza. “Until then, there’s bash.

“Cute pattern-renaming tricks in file managers just don’t cut the mustard compared to being able to use xargs, sed, tr and so on to allow one program to act on the output from another program, and having to use a whole bulldozer when you just want to reinvent the wheel slightly doesn’t make any sense, either,” Espinoza added.

“The CLI is far from dead, and nothing can beat it for complex tasks,” echoed consultant and Slashdot blogger Gerhard Mack. “Even Microsoft has realized that and pushed a better command line for their servers for the last few years.”

The Right Tools for the Job

Chris Travers, a Slashdot blogger who works on the LedgerSMB project, took a similar view.

“Saying that GUIs obsolete CLIs is like saying word processors obsolete Emacs or VIM,” Travers opined. “They are different tools for different jobs.”

Travers sees it as a matter of information density.

“A GUI is very good at providing dense info to the user, but very poor at receiving dense info from the user,” he explained. “A CLI is a bit more rounded but will never be as good at providing dense info to the user as a GUI is. Where it really excels is in receiving dense information from a user.”

Keystrokes Rule

Case in point: “Imagine how many mouse clicks and keyboard strokes it takes to tell a GUI ftp program, ‘download file.txt but into myfolder, not the current local directory, and rename it to myfile2.txt,'” he suggested. “Last time I tried this it was at least 8 clicks plus typing.”

In a command line ftp tool, on the other hand, “you just type: get file.txt myfolder/myfile2.txt,” he pointed out. “Much easier, and the typing better flows from thought.”

So, “there are many tasks, including many sysadmin tasks, where GUIs do provide better tools,” Travers concluded. “But there are many more areas where keystrokes are just a better way to tell the computer exactly what you want done.

“Just as surfing the web in elinks (a terminal, text-only browser) can be a bit painful, so too can managing computers at the GUI be needlessly painful,” he said.

For Geeks Only

Roberto Lim, a lawyer and blogger on Mobile Raptor, wasn’t convinced.

“Using the Command Line evokes a sense of pride, so I expect to get flamed by your readers,” Lim told Linux Girl. “But I have to admit, I usually wind up typing commands from a guide without fully understanding their import.”

The Command Line Interface has its uses, Lim acknowledged, “but no piece of technology targeted at the consumer market should ever require that something be done via CLI; keep it as an option or you can take it out all together.

“If it is there, it should just be there for the IT people or tech support to use when you encounter a problem,” he opined.

Put another way, “it is like creating a website via gedit,” Lim concluded. “It’s cool. But in this day and age, who really wants to type ‘

‘ instead of just pressing the ‘Enter’ key?”

So, “is it a ‘crusty old relic?’ Most people do not even know that it is still there,” he added.

Not a Desktop OS

Slashdot blogger hairyfeet took an even stronger view.

“YES YES YES!” hairyfeet began. “There are only TWO reasons to use CLI — repetition and scripting — and how many desktop or laptop jobs require writing scripts or repeating the same actions constantly? That would be pretty much none, which is why I say as long as CLI is the dominant way to do anything in Linux, it is a SERVER OS and not a Desktop OS.”

To wit: “If you think Linux is ready to take on the desktop, then accept my challenge,” hairyfeet said. “Take ANY distro and REMOVE CLI for a period of one year. Make your OS behave as does every actually modern OS does on the planet.

“Sadly I doubt you’ll even be able to get most Linux distros to boot at all without Bash or some other shell,” he predicted. “It has become such a crutch for everything that I doubt you’ll even get to a desktop without it.”

For Some, Priceless

That view, however, was far from undisputed.

“BASH commands and scripts are a wonderful tool for system administrators,” blogger Robert Pogson offered. “Few others users need to bother with them.”

That said, “such things may be crusty, but they work very well,” Pogson opined. “I can type a command and check the time on every machine on my network, or update software, or add a particular application to a particular list of PCs or all of them.

“That’s priceless,” he added. “Gold and diamonds are ancient, too, but they are valuable.”

Lingua Franca of Linux

In fact, “one thing that I find valuable with scripts and commands in GNU/Linux is that with hundreds of distros, it’s all but impossible for a system administrator to be conversant enough with all the distros to do all the basic operations without commands and scripts,” Pogson pointed out. “The same goes for helping novice system admins or remotely administering a PC.”

So, “I like to call that language the lingua franca of GNU/Linux, covering all distros on all PCs with any installation,” he said. “A Debian guy can help a Red Hat guy or vice versa, even if one uses GNOME and the other uses Xfce.

“Can an XP guy help a ‘7’ guy?” Pogson added. “Maybe. Maybe not. Can a Debian Sarge guy help a Debian Squeeze guy? Yes. Commands are the right way to do IT. It’s a unifying force in GNU/Linux.”

Katherine Noyes has been writing from behind Linux Girl's cape since late 2007, but she knows how to be a reporter in real life, too. She's particularly interested in space, science, open source software and geeky things in general. You can also find her on Twitter and Google+.


  • There’s an axiom referred to Betteridge’s Law of Headlines, and it reads as follows:

    "Any headline which ends in a question mark can be answered by the word no."

    This article’s headline is no exception.

    • It can be answered by the word yes equally well.

      As usual, this discusssion mixes scnearios to get to no conclusion, unsurprisingly.

      Can a Red Hat admin help a Debian admin? Yes. Can a Windows XP admin help a Windows 7 admin? Sometimes. Well, who cares about admins? They can get proper documentation and help in hundreds of places. Admins are not the problem. The problem with the CLI is anyone but admins. It’s ordinary users.

      I have never seen anybody advocating removing the CLI from a distro. Even Windows and Mac have their perfectly functional terminals. What’s bordering idiocy is trying to help NEWBIES with terminal commands. THIS MUST END AT ONCE.

      There’s absolutely no need for a Red Hat expert to help an Ubuntu newbie. It’s Ubuntu experts who help Ubuntu newbies, which is perfectly fine and it’s the way to go, because for an ordinary desktop user THE DESKTOP IS THE OS. The CLI has to be erradicated from tutorials oriented towards ordinary people. I’m not saying just "reduced", but completely removed, banned, exiled. For good. Forever. And now. Never ever again a howto using command lines for Ubuntu desktop users. NEVER.

  • Over my dead body! I can’t imagine a world without GUI (Actually, I can since I’m old enough to have used 8-bit machines on a daily basis…) but I can’t either imagine a world without CLI. A GUI is very handy to navigate across folders but as soon as I want to do simple tasks like rm ./*~, the GUI is just inefficient. And I’m not even talking about finding if a specific lib is installed, what version it is, and if it was installed with the package manager or by hand, so I know which route to take to update it eventually. It can by done by GUI… but it’s just faster to open a terminal and type "checklib whatever". I made this tiny script in the old days when I used to compile much more than nowadays.

    I could give an endless list of cases where the CLI beats the GUI hands down.

    The GUI is very good at showing things. It’s more pleasant to look at a window full of icons but doing anything beyond clicking them one at a time is just easier with the CLI.

    As for removing Bash, please! It just can’t be done. You can hide the boot process beyond a pretty picture but in the end, the OS still needs to do a predetermined list of tasks. It’s possible to write a monolithic piece of software to do it (I prefer not to even think of the kind of Frankenstein monster that would be.) but, at best, I would call it a non-interactive CLI. The CLI way is just easier to maintain.

    As Murphy used to say: If it ain’t broken, don’t fix it.

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

LinuxInsider Channels