A Bash Primer

Filed under
HowTos

With the graphical interfaces within Linux distributions becoming more and more enhanced, the number of users avoiding the command line is increasing. And that's a shame; there's so much power and possibility within the shell that to steer clear of it is to overlook a mighty gem.

If you're one of those avoiding the command line, this primer is for you.

The Linux command interpreter is called a "shell" and the default shell in many Linux distributions is "bash." When you open a terminal window or log in at a text console, the bash shell is what prompts you for commands. Then, when you type a command, the shell executes it.

Just as there are multiple GUIs (GNOME or KDE) for Linux, there are a number of shells besides bash. For example, the C shell is one that some people prefer. You can easily change your default shell to this by using the chsh command.

In addition to the standard Linux commands, bash can execute any computer program. So you can type the name of an application (the name is usually more cryptic than what you see in GNOME or KDE menus) at the shell prompt, and the shell starts that application.

Understanding the Syntax of Shell Commands