How to Open the Bash Shell in Ubuntu
Learn what Bash and the Terminal are, how to open Terminal from the Ubuntu application launcher, and how to recognize the Bash command prompt.
What Is a Shell?
A shell is a command interpreter: a command-line environment that reads commands you type, runs programs, and communicates with the operating system.
This lesson uses Bash, short for Bourne Again Shell. Bash is a widely used Linux shell and is commonly available when you open a Terminal window in Ubuntu. You can learn more about Bash in Bourne Again Shell Bash.
Many everyday command-line tasks work similarly in other Linux shells. However, shell syntax, scripting rules, variables, and advanced features can differ. When a lesson specifically shows Bash syntax, use Bash unless the lesson says otherwise.
Terminal Versus Shell
A terminal is a graphical application that provides a place to interact with a command-line session. More precisely, it is a terminal emulator: software that simulates a text terminal and hosts a shell session.
Bash runs inside the Terminal. Bash supplies the command interpreter and displays the command prompt. The Terminal supplies the window and graphical conveniences such as selecting text, copying and pasting, and changing font or display preferences.
In other words, the Terminal is the application window, while Bash is the shell running in that window.
Open Terminal from the Ubuntu Desktop
These steps use Ubuntu's desktop application launcher. On some Ubuntu desktop versions, the launcher was labeled Dash Home and appeared near the upper-left area of the desktop. Newer versions may use an Applications button, an app grid, or another launcher layout.
- Open the Ubuntu application launcher. Look near the upper-left area of the desktop for the launcher, or open the desktop environment's application menu.
- Type
terminalinto the application search field. - Find the application named Terminal or a similarly named terminal emulator in the search results.
- Select the Terminal application to open it.
A terminal window should appear. Ubuntu commonly starts a shell automatically inside this window. Wait until you see an interactive command prompt with a cursor. The prompt indicates that Bash is ready to receive input.
Recognize the Bash Prompt
A typical Bash prompt may look like this:
bob@ubuntu:~$
The exact text differs between computers because each Ubuntu installation can have a different username and hostname. The prompt may also contain additional information when it has been customized.
| Prompt part | Meaning | Example |
|---|---|---|
| Username | The name of the currently logged-in user account. | bob |
| At sign | Separates the username from the computer name. | @ |
| Hostname | The name assigned to the computer. | ubuntu |
| Current directory indicator | Shows the current location when included. The tilde represents the user's home directory. | ~ |
| Prompt symbol | Shows that the shell is waiting for input. A regular user commonly sees $. | $ |
In bob@ubuntu:~$, bob is the username, ubuntu is the hostname, and the at sign separates them. The trailing $ is part of the prompt, not a command to type. A text prompt followed by a cursor is sufficient evidence that the shell is ready.
Troubleshooting
Terminal does not appear in the search results
- Check that
terminalis spelled correctly. - Look for an application named Terminal or another similarly named terminal emulator.
- If your launcher layout differs, use the desktop environment's application menu instead.
The prompt does not match the example
This is normally expected. Your username and hostname are specific to your Ubuntu installation. The important sign is an interactive text prompt with a cursor, not an exact visual match.
A window opened, but Bash is not obvious
Ubuntu commonly starts a shell automatically when the Terminal application opens. Continue only after you see a command prompt that accepts keyboard input. If the window shows a message or a program instead of a prompt, close that program or open a new Terminal window.
What to Do Next
Once the prompt is visible, enter subsequent Linux command lessons at that prompt. Leave the Terminal window open while following command-line exercises so you can enter each example in the same shell session.
Good next subjects include essential Linux topics, the Linux filesystem, and finding the full path of shell commands.