First, I must say that using CLI is not always faster, not necessarily. There are tasks which can be done faster and easier using some GUI application rather than typing a whole bunch of commands. But, nevertheless, command line is still very powerful and it's more appropriate to use it for certain tasks. I for one use probably 90% GUI tools and applications and only in 10% of the cases CLI. So, you may ask, what's the scope of this? Well, in the first place, this article is about the reasons I believe to be noteworthy for using CLI in several situations, and what advantages it has.
Some prefer GUI, others CLI, and others (including me) prefer both. In the future I'll probably make an article listing 10 reasons to use GUI over CLI, but until then, here are the main reasons I use my share of CLI applications.
1. Complete control over the system. This may vary. What I'm trying to say is that I got used to do some task using some CLI tools instead of a graphical application. Now using that application makes me wonder whether it will pass exactly the arguments I wanted to the command line tool or use some defaults which I don't want. Not once I saw a graphical application based on some CLI tool which only implemented half of its options, so I wasn't able to make it what I actually wanted.
2. Powerful for many tasks. CLI is often more powerful than GUI applications for specific tasks. For example, consider having a directory with hundreds of different file types in it. Moving, copying, eventually renaming them would be very hard in a GUI file browser. Selecting almost each of them with the mouse while pressing CTRL is not easy for such a big number of files and it also takes up more time. While on CLI, you can use one single command in order to perform whatever task and it's done.
3. Ability to use scripts. I have several small scripts in my ~/bin/ directory, which in Debian is detected and included by default in the $PATH. So I can run specific commands over some files in just one command and a parameter. This is very useful if you have some specific need or want a specific behaviour with some tool, which is not implemented in any graphical application.
4. Less memory. For whom it matters, using command line won't make the system load additional libraries which are not already loaded for some GUI application.
5. Ability to use aliases. Aliases are a great feature implemented by shell applications which allow a user to perform one or more commands using one simple, easy to write command, called an alias. The ability to use those often makes work easier.
Please share your advantages (if any) you may think of for using CLI whenever a GUI alternative is available.
Updated: Jul 05, 2008 (Created: Jul 05, 2008)