USING THE command-line (CL) is scary for many computer users especially those using Linux. All effort is wielded to avoid it as much as possible. One major reason for this trend is that many of such users are coming from using an operating system (OS) where important stuffs were done point-and-click style using only the mouse. I can personally resonate with that experience. It was scary for me too when I first started out with Linux. I’ve always been used to windows – in fact there was a time I thought that the term “operating system” was a moniker for Windows. There were good reasons; that’s the only OS available to me at that time. And using the windows command interface (cmd.exe) was never a consideration for me.
Sadly, this is how many newcomers to Linux feel today. It is important that every Linux user be comfortable with the CL because many tools that make Linux powerful enjoyable require the use of the CL.
In this post I’ll debunk some (5) myths about the Linux command line; to make you see the Linux CL as a friend rather than a foe.
Let the debunking begin…
Many Linux distributions (_ distro _ for short) are now bundled with stunning click-friendly graphic user interfaces (GUIs) in the form of desktop environments (DE) and themes. But this has not made the usefulness of the CL obsolete. Not everything that can be done with the CL can be done using the GUI. A mastery of the CL would increase your work-flow (the time it takes for you to complete tasks on your computer) while saving you valuable time.
The CL enables you to do very powerful things. Let’s take a look at how this can be seen when changing access permissions in files. Imagine you wish to change the access permissions on a file. To do this using the GUI the steps might include:
1: Opening the directory/folder containing the file
2: Right-click on the file and select properties from the drop down menu.
3: Select the “permissions” tab.
4: Change the permissions access for the “owner” category to read and write.
5: Change the permissions access for the “group” category to read and write.
6: Change the permissions access for the “other” category to read and write.
Using the command-line, you can achieve the same result by typing the following:
sudo chmod -R -v 777 /path/to/directory/containing/the/file/
This is one step from the CL instead of six steps for just one file using the GUI. Unlike the GUI, using commands is scalable; no matter the number of files (let’s say 1000) in the directory it is still that single line of command. But would you want to change the access permissions of one thousand files by hand (clicking)? That would require a total of 6000 steps.
This is one of the most compelling reason why you need to start using the CL – it will save you a lot of time.
You get the point, right?
This one is age old, especially considering the fact that Linux is a product of geeks or “hackers”. In recent times, there’ve been many advancements in the development of appealing desktop experience to put t his myth to rest. Linux (in different distributions) now looks and feel similar to OSes hitherto considered very user friendly. And the command line can be configured to look attractive in different ways through things like custom background images and font type and colour.
The CL is not about who is a geek or not but about getting things done and fast. Saving a lot of time in the process. With a grasp of common commands the CL can be used to perform regular computer operations without necessarily being a “geek” or “programmer”.
It is true that the Linux CL give direct access to a computer system. But there are built-in mechanisms to ensure unwarranted access to the computer is prevented. One important way is that, even if an unauthorized person gains access to your CL terminal, most serious commands (the ones that might cause harm to your PC) require the password of the system owner to execute. Another feature weaved into the Linux system is file permissions. Depending on the amount of permission granted, a password (from the owner of the system) is required to perform some file operations like opening (read), modifying (write) and running (execute).
Seriously? This is impossible, let alone practical. There are hundreds of commands available and more are constantly being created. It is unreasonable to expect that you should “know by heart” or master these commands to be able to use the Linux CL. Only about a dozen command or a little over that would be used constantly; and these are the ones you need to focus on. In fact the more you use a command the easier it would be to remember. The CL is to get work done using commands, It is important for you to know that there’s no need to worry about getting to know all the commands that would be useless to your productivity.
And there are many resources built in the CL to give you help when not sure about a command or how to use it. This would be addressed in the next point.
There’re many CL assistance tools available in Linux to make sure you get a pretty much balanced knowledge about how different commands work and how to use them. For instance, man pages are available for Linux commands. The man page is a synopsis of command function and options. To check how to use the “cat” command for example simply type in the Linux terminalthe following:
There’s also a command “help” feature that comes with most commands that you can check. For instance:
cat -–help (or cat –h)
When a wrong/improperly typed command is entered into the terminal, Linux gives a feedback that can contain either options of commands with similar spellings (trying to guess your intention) or the proper command combination.
GET FAMILIAR with the Linux command-line now! There’s nothing to be afraid of. REMEMBER tiny drops make the ocean.
Stay awesome and;
The post Why these 5 myths about the Linux command-line are false appeared first on Foss Naija.