Shell is a command-line interface or command language interpreter used in Linux and other Unix-like operating systems. It allows users to interact with their computers through text-based commands.
Shell provides a way to perform various tasks, manage files, execute programs, and configure system settings, all without needing a graphical user interface (GUI). In Linux, we use Bash short for Bourne-Again Shell. It was developed under the GNU Project and written by Brian Fox.
Nowadays, Bash is the default user shell of most Linux distributions. There are different flavors of a shell, just as there are different flavors of operating systems. Each flavor of the shell has its own set of recognized commands and functions.
|
) and redirect input or output using symbols like >
and <
.Based on opening the shell we have:
The login shell requires the user to authenticate with a user id and password before we start executing commands. To launch a login shell use short key CTRL+ALT+F3/F4 /F5/F6 and CTRL+ALT+F2 to close it. The Login shell has no GUI like the Non-Login shell.
The Non-login shell has GUI and it doesn’t require credentials to start working with. Like there are different distributions of Linux in the same way based on features we have different shells available in Linux as listed below:
Bash is one of the most widely used and default shells in many Linux distributions. It’s an enhanced version of the original Bourne shell (sh) with additional features for scripting and interactive use.
The original Unix shell, known as the Bourne shell, is simple and efficient. It lacks some of the features found in later shells like Bash but is still used for basic scripting tasks.
The C Shell offers a C-like syntax and features like history recall using the arrow keys and file name completion. It’s often preferred by programmers familiar with C.
An improved version of the C Shell, tcsh adds more features, such as command-line editing and better command history management.
The Korn Shell was developed by David Korn and combines features from the Bourne and C Shells. It includes advanced scripting capabilities and interactive features.
The Z Shell is designed for both interactive use and scripting. It includes advanced command-line editing, tab completion, and powerful scripting features.
fish is a user-friendly shell with syntax highlighting, auto-suggestions, and other features that make it particularly welcoming for new users.
Each of these shells has its own syntax, features, and user community. The choice of a shell often depends on personal preference, the tasks you want to accomplish, and the features you find most helpful.
To use Bash, you typically open a terminal or command prompt on your Linux system. From there, you can start typing commands and pressing “Enter” to execute them. For example:
Prints the present working directory path.
list all files and directories of the current path.
This command allows you to change the current directory or navigate to a path. For example use syntax: cd Music/ to change the current home directory to the Music directory as shown. Command pwd confirms we are inside the Music directory now.
This is how we interact with the shell using commands. It is just a quick demo there is more to this as each command has its own sets of options and functionality. We will see it in great detail in upcoming articles.
Diving into the world of the Linux Bash shell is like gaining a superpower for your computer. It’s like learning to speak the language of your system and telling it exactly what you want it to do. With each command you learn, you’re becoming more in control of your computer.
Remember, starting from the basics and practicing a little every day can turn you into a Bash shell superhero. So, whether you’re just curious or aiming to be a tech whiz, exploring the Linux Bash shell is a journey well worth taking.