Developers cringe at the thought of opening terminal windows. It can be overwhelming, stressful, and even downright irritating for the uninitiated. However, developers who are proficient in the command line will argue that it’s the most powerful tool at your disposal.
How important is the command-line for modern development? It’s essential to both frontend and backend code success. The command line is a Swiss Army knife, with many features hidden behind simple commands. Learn these commands and you might be amazed at the power that is available from that small black rectangle with a flashing white cursor.
1. System Functions are more easily controlled
The most obvious reason to know the command line is for the original function greater control. You can access commands only through the shell. These commands allow you to control complex operations on Unix/Linux or Windows machines.
Basic commands could include changing permissions or browsing to hidden directories. Server administration could be used to manage a local server like Apache/MySQL.
To understand the workings of shell commands, it’s worth exploring at least some of their possibilities. It’s not a good idea to ignore a piece of technology because it is too confusing.
We also have many web development tools that operate via the command line, but we need to look beyond system functions. You won’t be able to download and install everything like an app. Understanding shell commands will help you avoid the hassle of installing the latest tools for developers.
2. Bash Skills are popular and pay handsomely
According to 2020’s StackOverflow’s Developer Survey bash/shell (i.e. According to the survey, bash/shell (i.e. the Linux command language interpreters family) is the sixth most popular language overall. It also was high on the most-loved technology list (53.7%), and lower on the most-dreaded technology list (46%).
StackOverflow’s survey is open to all software engineers and developers, but the command line is particularly relevant for data scientists, as Bash/Shell correlates strongly with Data Science technologies such as Python, IPython/Jupyter, and TensorFlow. This was also supported by the Python Software Foundation’s most recent Python Developers Survey.
3. Learning Bash makes you more flexible
You’ll find that you are more flexible in a data science job if you can use the terminal instead of relying on GUIs. The command line runs programs that run other programs, hence the name “shell”; therefore it is easier to interact between programs in the command line.
It’s easy to create scripts once you have mastered the bash commands. Shell scripts make it much easier to build all kinds of data pipelines or workflows. You can interact with your computer by learning how to use the shell. The GUI can be used whenever you like, but you can also use the command line to provide more control and power for times when you are in need.
4. It’s easier to work with text files
Text files are one of the most popular ways to store and manage data. Text files are a common part of almost any data science project. Data scientists will find it very helpful to be able quickly and efficiently handle text files. The shell includes powerful text processing tools such as AWK or sed. These tools are useful for getting to know files and data cleaning.
The code below, for example, uses AWK to print the first and third columns from a file called a_csv_file. Dataquest is the second field value.
5. It is less resource-intensive
If you have limited computing resources, or want to maximize your speed and efficiency, using the command-line is almost always better than using a GUI. A GUI requires resources to render the output. This holds true for both local and remote work. Remote connections use more bandwidth than terminals and can waste resources.
Moreover, latency, i.e. The “time interval between stimulation and response” will be greater when you use a GUI. This can be frustrating if your mouse is a few seconds behind your movements. The latency will be lower if you are just typing commands. It will also be easier for you to manage since you can see exactly where your cursor is at any time.
6. For the cloud, you need command line skills
Cloud services are often connected to and managed through a command-line interface.
This is especially important when you need to do more complex data science work, such as deep learning, and your local computing resources may not be sufficient to complete the tasks that you want. This 2018 article is a quote from Nucleus Research. The same article states that “96% of deep learning is done in the cloud today.”
Command-line skills are required to move your data efficiently to the cloud if you are interested in deep learning techniques such as deep learning.
7. You Can Probably Type Faster Than You Click
Research has shown that mouse use slows down, but keyboard use can be much more efficient, despite the steep learning curve. A questionnaire was given to 251 Microsoft Word users. It assessed their choices for the most commonly used commands. Contrary to what we expected, most users of Microsoft Word prefer icon toolbars over keyboard shortcuts.
Another study was conducted to confirm that keyboard shortcuts were indeed the most efficient. Six participants used keyboard shortcuts, icon toolbars, and menu selection to perform common commands. As expected, keyboard shortcuts proved to be the most efficient.
This means that even though you may feel faster using a GUI, there is a good chance you will be more efficient with the command line for certain tasks.
8. You Can Utilize Git Version Control
Both developers and programmers should be aware of the importance of version control. It is almost impossible to merge/split a project into different versions. Git can be difficult to learn if one doesn’t know how it works. Add to that the complexity of Git’s command-line interface and you can see why Git is so scary for developers.
There are many resources available online that can help you learn the basics.
Use Git, a free tool on GitHub that allows you to play around with Git without having to install it locally. This tutorial is for developers who have no knowledge about version control.
Learning Git can be difficult because you have to remember the commands and also learn the command line. However, there are desktop applications that provide a GUI, but they still require you to know the basics of version control (cloning/branches, merging, etc. A basic understanding of Git CLI is a prerequisite for performing advanced Git operations that you may not be able to perform with the GUI. The CLI is more reliable and quicker, especially if you are working on large Git repositories.
Git can be difficult to learn for beginners. It can take several months to master the concepts even with regular practice. However, Git is an essential tool for any developer. It’s also one reason to master the command line.