So, what is the advantage of using the terminal? [closed]

I just installed Ubuntu a couple of days ago. As far as I can tell the terminal is a huge part of any Linux distro. My question at this point is why? When I look up anything about it, the commands put in the terminal are all easily done through the GUI. So, what are the advantages of using the terminal?

Edit: Thanks for the answers everyone. After a little poking around, and with the help of your answers, I can now understand its use. I can proudly say, that for the past 3 days, I've been using it for just about everything, and I hope to soon have a better grasp on scripting.


Solution 1:

The terminal in Unix is a wonderful, powerful tool. When transitioning from the world of Windows it is hard to appreciate this because the Windows (cmd.exe) shell is rather, how do I nicely say, lacking. Most *nix default shells (bash, zsh, etc) have several advantages:

  1. It is standardized through POSIX and the Single Unix Specification, so a script you write for one computer will likely work on all POSIX compliant machines (assuming you restrict yourself to standard commands, of which there are lots). Microsoft has a habit of including tools in some versions and not in others, making batch programming very hit or miss

  2. Because Unix was built from the terminal up, most everything is configurable from the command line. Windows was like this up to a point, but they opted to drop the 16-bit subsystem and DOS with it. Now the GUI is the only way to change some things in Windows.

  3. Because it is so flexible. Commands can be piped together (ls | grep filename), they can be captured (gcc program.c > ./standard_out 2> ./standard_error), and can be substituted (ls /home/`whoami` or ls /home/$(whoami))

  4. Because UNIX utilities are designed to do one thing, and do it well. Just look into awk,grep,sed, wget or a host of others. By themselves they achieve a single task, but given #3 and #2 they can be built into powerful expressions.

  5. Because of the ability to automate tasks. cron and bash scripts allow long, complicated, and/or repetitive tasks to either be simplified or automated completely.

  6. Because humans are prone to error. Relatively short shell scripts can be used to change settings in a consistent manner. Safety checks can be built into the scripts, rather than relying on users to know which commands are safe to run in different circumstances.

Solution 2:

There are a multitude of advantages to using the terminal. Arguments range from convenience, productivity to nostalgia. Here are some :

  1. There are some things that you (rather me) simply cannot accomplish using a GUI. It is not because it isn't doable, it is simply because nobody bothered to write a GUI for these commands. For example if I wanted to use some command, say mdf2iso to convert a whole bunch of files in a folder. I can pipe the output using | operator and do it in a single stroke.

  2. For a lot of us, it is just the way things should be. Keep in mind that this has little to do with expertise. I am no linux expert, I am just a regular user, but I do prefer to use the command line wherever possible. This is not so much of an argument about why it should be used, as much as why it is used.

  3. Scripts are a powerful thing. You can use conditions if and loops for etc.. and do all sorts of things combining the power above. There is no limit to the power of scripting. You can automate complex tasks which are tailored to your requirements. For such things, it is often hard to find a GUI app that matches your requirement.

  4. You can perform tasks by remote login, even over very low bandwidth settings.

  5. Helping, writing tutorials etc are much easier if you can specify the commands to the other person. This way, you do not have to take screenshots. This has another advantage for the person who is being helped as well, which brings us to the next point.

  6. Using the command line usually gives you a better understanding of what you are doing and what is going on.

  7. And lastly, it is simply faster. It is much quicker to type a few letters and press TAB than to click though endless menu options. You can use !mo to invoke the last command you ran that started with mo (e.g. mount) and so on.

I am sure there are a thousand other reasons I failed mention.