Skip to content

Why And How To Use The Command Line In Linux Pt. 1

Using the command line in linux can be a bit of a challenge at first. Read in this first part of the Command Line Series WHY you should still use it.

The Command Line In Linux. Before I go on about how to use it, let’s examine first, why you need to use it.

I’d like to start with a comparison:

Imagine a programmer creating an application, but except writing the code on his own, he uses drag and drop builders for his application. Now while some of the block builders available can be useful to teach kids how to code, you would never expect to see a grown up, full time software developer using one of these. It just doesn’t fit the image.

Not just that, he also doesn’t have full control over what he’s actually producing. The code. The application.

And this leads us to why you should use the command line in linux. Control and Freedom.

The problem with freedom

how to use the command line in linux freedom

With linux you have freedom. There’s the GNU Project, a huge community and the overall idea of it, to be free. But the problem with this freedom is, that the system doesn’t guide you through it. You can make whatever you want. You can make it make whatever you want. It’s all up to you. You just have to know how to.

Most people are not really aware of this. They use linux because it’s free and mess around with the graphical user interface (GUI). And let’s be honest, the GUIs have been improved over the last couple of decades, but still. It’s as they’re almost scared of the command line interface (cli) or just think it’s an old thing that’s just there for nostalgia value. Or super awesome hackers.

They can’t really harvest the full potential of it. With the command line, you’ll have the freedom to make “difficult tasks” easy. Everything can be done there. Well, I would not recommend it for a spreadsheet or word- like document. But for everything system specific.

What’s the benefit of using the command line

The benefits of using the command line don’t just stop with freedom. You have a couple of benefits from it:

  • It’s faster
  • You can automate it
  • It’s actually easier (for most stuff)
  • You’ll look like a super awesome hacker I mentioned above earlier (and you’ll feel like that, too :P)
  • You know what’s happening (hopefully)

Linux is modeled after the unix family of operating systems. And with this, comes the rich heritage of command line tools as it. Here are a couple of things you could do with the command line (often with just one line):

The possibilities are almost endles. You don’t have to limit yourself to the stuff linux gives you out of the box. Use scripts others wrote or create your own bash scripts.

But it’s so hard

command line enlightment

Learning the command line can be challenging in the beginning. It could take real effort. But it’s not hard. It’s just so huge. There are thousands of cli-programs that come out of the box with linux. Not to mention the additional user created stuff I told you about above.

But it’s really rewarding. I have never heard of a cli-program for linux to cost money for example (don’t quote me on that!). And once you’ve mastered (or at least learned some of) the cli you wont have to learn a new cli next year. It’s long lasting. Unlike technologies we use today that change or get thrown away every minute, the command line interface is around since linux started. And that’s a long long time.

You will get real power over your machine, server or even smartphone (if you’re using android).

And if you don’t like learning, you can use man or --help in most cases and get to know what the command does. On the fly.

More reasons

To prove the point of using the command line, I started a reddit thread in the linux subreddit. And the users are commenting on why and for what they use the command line, pro contra and even just why the like it or don’t. So if you need more reasons to start using the command line, I’d suggest reading through the thread.

But the most mentioned reasons are similar to the ones told above:

And User uselessabstraction pointed out:

There are several benefits to the command line interface.

If you know what command you need off the top of your head, it’s faster than using a GUI.

CLI programs can offer a lot more features without becoming an abomination, while a GUI with hundreds of options is very difficult to make intuitive and user friendly.

Commands can be shared via copy+paste, while GUI instructions require a detailed step by step list of actions and/or many screenshots.

CLI programs typically can be chained together into a pipeline, where one program uses the output of another as input – this is not very trivial for GUI programs to implement.

The CLI enables you to work on remote machines without having to deal with laggy miserable VNC sessions.

The CLI empowers you to fix your machine when the video driver breaks.

Finally, the CLI lends itself to automation in a way which is a lot more simple than macros in GUI programs.

Link to comment

They even pointed out a couple of sources on why to use the command line (mainly because I asked them to post some sources):

“Ok you convinced me, now how does it work?”

If you’re really interested in learning the command line I suggest you installing linux on a vm or your machine (if you haven’t already). Then read this FREE linux book by William W. Whotts Jr. There’s a “paid version” of it on amazon, too. It also starts of with a little “WHY”- Section, from which I got some inspiration.

And stay tuned for Part 2: How To Use The Linux Command Line!

Published inLinux

Be First to Comment

Leave a Reply

%d bloggers like this: