12 reasons to learn the command line

Switching from graphical user interfaces (GUIs) to the command line is not easy for many novice programmers. In addition, it feels like you could break something here quickly or make the operating system smoke. This is not the case, however, because the command line is a very efficient tool for any user and especially for programmers.

In this article, I’ll show you 12 reasons why you should definitely learn the command line (bash) . Let’s start:

1. Experienced Bash users are popular and well paid

According to the Stack Overflow’s Developer Survey , the shell (command line / bash) is one of the most popular languages ​​(skills). Someone who has good command line skills can look forward to higher salaries than those of Python and R programmers.

Even if this survey is mostly about developers, the command line is particularly interesting in the area of ​​data science. Bash works hand in hand with programming languages ​​and data science technologies such as Python, IPython, Jupyter, TensorFlow, PyTorch and many more.

2. Automate annoying repetitive processes

A data scientist has the task of making certain information available on a regular basis. Depending on the data source, this data must be provided several times a day. The way in which this data is recorded, processed and displayed is mostly identical.

The command line is very well suited for this purpose, as commands can be easily automated and replicated.

Let’s look at the following scenario:

Your employer has decided to make an investment in data analytics. Several data professionals will be joining the team. You are responsible for setting up all computers with all programs so that the new employees can get started immediately.

If you can work with a CLI (Command Language Interpreter), you can write a few simple scripts that install, configure and test everything automatically.

If you can’t do that, you’ll have to resort to a GUI and repeat the same mouse and click movements across multiple computers. This manual process quickly becomes tedious, tedious, and time consuming.

This is just one example of how simple command line skills can help to scale and automate data science processes.

3. Bash skills make you more flexible

In a data science role, you will often find that you have more flexibility when you use the terminal instead of GUIs.

Since the command line is a program that executes other programs (hence the name “Shell”), the interaction between programs is often easier to set up on the command line.

Once you have mastered the necessary commands, it is relatively easy to write scripts. Shell scripts make creating all kinds of data pipelines and workflows a lot easier.

Put simply, these skills enable you to interact better and more efficiently with your computer. You can always go back to the GUIs, but the command line can give you more direct control when you need it.

4. Working with text files is easier

Text files are one of the most common ways to store and process data. Almost every data science project will involve text files somewhere. The ability to manipulate text files quickly and efficiently is therefore a very useful skill for a data scientist.

The shell has very powerful word processing tools such as AWK and sed that help you get to know files and make data cleansing easier. All it usually takes is a line of code!

5. The shell is resource friendly

If you are working with limited computing resources or just want to maximize your output, using the command line will practically always be more beneficial than using a GUI. The reason for this is that GUIs have to spend resources on rendering the graphical output.

This applies to both local and remote work. When connected remotely, GUIs consume much more bandwidth than terminals and “waste” resources.

In addition, the latency, ie the “time interval between input and output”, is higher when using a GUI. This can be frustrating when you try to control a mouse but it reacts 1-2 seconds later. If you primarily use the command line, the latency is lower. The processes will be easier to use because you don’t have to operate a mouse cursor and drag it to the right place.

6. Cloud services

Cloud services are often connected to a command line interface and operated via this.

This is particularly important for more advanced work such as deep learning, where your local computer is usually not suitable to cope with the upcoming tasks due to a lack of hardware resources. According to several studies from 2018, only 4 percent of machine learning and deep learning projects are carried out on site.

So if you work with deep learning or machine learning, you are dependent on the cloud and therefore on the command line.

7. Learn once, apply everywhere

There are many different shells such as bash, zsh, fish, ksh, tcsh, cmd, Windows PowerShell, and many more. If you are familiar with one shell, it is very easy to work with other shells. This is especially useful if you use online services that need some kind of CLI.

On the other hand, all GUIs look different. If you work with 10 programs, you first have to get to know all 10 GUIs. This is also more time-consuming than working with a shell.

8. You type faster than you click

While it definitely takes longer to type quickly on the keyboard (10-finger system) than to use a mouse, the keyboard’s higher learning curve quickly pays off.

There are several studies of Microsoft Office users that have shown that the majority of users are more likely to click the mouse than to use the more efficient keyboard shortcuts. Even if you feel like you are working super fast in a GUI, there is a high chance that you will be more efficient on the command line for at least some tasks.

9. Auditing and debugging is easier

Because it’s so easy to keep track of all of your activity on the command line, auditing and debugging is a lot easier.

You can use the command line window as a history to keep track of every single action you have taken in the shell. On the other hand, a wrong click in a GUI can lead to an error that you cannot track straight away because there is no history.

10. The Unix shell is available everywhere

Although the Unix shell is only installed on MacOS and Linux machines, Windows users can still benefit from the Unix shell with tools such as WSL, Cygwin and MinGW.

This means that you can use the skills that you learn , for example in our command line quick start course , on practically any computer (including your PC, regardless of which operating system you are using).

11. “Talk” to the computer

When we interact with the computer through a terminal, we use commands.

These commands are part of a language and they are extremely expressive. The command line allows us to use the power of language to interact with the computer in an elegant and efficient way.

You will achieve the highest efficiency with a balanced combination of a CLI and GUIs. The point of a command line is not to do without GUIs entirely. Rather, it’s about having another tool in your toolbox to perform certain tasks better and more quickly.

12. The command line is easier than you think

There is still a big misconception that you have to know several hundred commands to use the command line.

Yes, there are many hundreds of commands that you can learn. But you will only need a handful of commands to create complex automations in the shell.

Did I convince you to give the command line a try? Get started right away in our command line learning tutorial or take the LearnProgramming command line quick start to master the shell.

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment