This wiki was updated to MediaWiki 1.37. If you notice any issues, please report them to admin[at]opensuse.org

Bash

Jump to: navigation, search
Icon-expand.png This article is a stub!
This article needs to be expanded. You are welcome to help in line with the Style Guidelines.
Bash or Bourne-again shell is the default Unix shell for most Linux systems. It was created by GNU project as a free alternative to Bourne shell

History

Bash shell was written by Brian Fox and was first released in 1989. It is the official shell of GNU and the default shell of most Linux distributions including openSUSE.


Overview

This article is not attended to be a BASH tutorial. Instead it is just a beginners reference to introduce the concept of what is called a command line interpreter. The command line interpreter(CLI) is often called the terminal or shell, and for simplicity we will use the terms interchangeably. If you are using the KDE desktop, the CLI is the application called konsole and in GNOME terminal. The commands listed in this article are to illustrate a point, and not meant as a teaching guide. Related article will provide additional information to learn more information about how to use the terminal.

Bash is a command language interpreter, and simply stated translates commands you type in to perform a some function. For example the ls command instructs the shell to, for example, print on the screen the files in your current directory. In fact, the ls command is actually a program or more commonly called an app. By typing in the ls command you are in fact running that app. Additionally arguments can be given to commands, which provide further instructions. For example, ls -l list more specific details about the files and/or directories.

The Graphic User Interface (GUI) or desktop environment is how many of use use our computers. For example we click on a folder that opens to reveal files contained within. From that point you can perform many tasks, such edit a file, create a new file or even delete a file. You can accomplish all and many more tasks by using the shell. The shell offers many advantages over the GUI. One of those advantages is often speed, the shell is often faster to complete many tasks. Another advantage is commands can be given with specific instructions. As you adventure into the wonderful world of your shell, you will find you can link two or more commands together, called a pipe. Pipes are an advance topic, not covered here.

Most of us use a combination of the GUI and CLI. Often times it is a matter of preference. Advanced user, for example programmers, users the CLI more often.

The external link section has a few web sites and other online resources you can explore to learn more about BASH.

General

To check what Bash version is installed

bash --version

For help

bash --help

Configuration

You can customize shell for each user using ~/.bashrc in his own home directory.

Remember that dotfiles (any file starting with a dot) are hidden.

And for everyone (including root) in /etc/bash.bashrc.


See also

Related articles

External links