Last time we discussed the Linux Directory Structure and the roles of the various directories that form a part of the Linux File System. In this article, we shall be discussing the Linux Shell, the Terminal, and the Shell Prompt.
One of the most popular shell programs for Linux based systems is ‘bash’ (which stands for Bourne-Again SHell). Bash is an enhanced version of the original Bourne Shell Program ‘sh’ written by Steve Bourne.
Some of the other popular Linux shells include the csh (C SHell), ksh (Korn SHell) , zsh (Z SHell) and the tcsh, which is basically a modification of the C Shell with programmable command-line completion, command-line editing and a few other features. But most Linux distributions use bash as the default shell.
Now, in order to interact with the Linux shell, we use a program called the ‘Terminal Emulator‘ which puts up a window and lets you interact with the shell. The terminal sends the data that you enter, to the shell’s (or other program’s) stdin in addition to displaying it on the window. It is also responsible for displaying the data (such as stdout & stderr) provided by the shell onto the window.
Find your dream job
Now start a terminal from the Utilities Menu, here is what a terminal window may look like:
In this case, the terminal is showing the username followed by the name of the machine and the fact that I am currently using the system as a normal user ($). The tilde (~) is a shorthand way of representing your home directory, like here it is equivalent to /home/navanshu. Had I been using the terminal as a superuser (#), it would have looked like this:
Note that the Linux shell prompt may vary from system to system. It may be multi-line as well. It can be customized to your needs. Here’s an example:
All your daily activities like launching an application, listing the contents of a directory, renaming or perhaps moving a file can generally be done easily through the normal user account. But actions that require the modification of system files or installation/un-installation of applications, require root user capabilities. Root or the Superuser is very powerful and Root access is typically restricted to system administrators. Generally, normal accounts can only do a subset of the things that the root user can do.
One question that might be bugging you could probably be — why should I go for a command line interface when I already have a Graphical User Interface at my disposal, which, according to me, is much easier to use?
Well, even though I wouldn’t deny the fact that GUI’s make navigation much faster but the fact remains that the command line interface is way more powerful than the GUI.
In most cases, like in the case of server distributions, GUI’s won’t be available, but there shall always be a command line at your service. In fact, the command line interface can even provide you with access to the lower levels of a machine’s hardware or software, thereby making it a must know thing for users.
Got any doubts, queries of your own, or any suggestions on the topics that you would like us to cover? Drop them in the comments below.