VMware ESXi and vSphere Cluster Management
Using the Terminal in Raspbian (LXTerminal)
Learn what the Raspbian terminal is, how to open LXTerminal, read the shell prompt, and run the safe date command on a Raspberry Pi.
What the terminal is
A terminal is a text-based application or interface for entering commands and viewing their results. Instead of selecting buttons and menus, you type instructions for the operating system.
The terminal is closely related to two other terms:
- Command-line interface (CLI): a text-based way to control an operating system by entering commands.
- Shell: the command interpreter that receives your commands, runs them, and displays results or errors.
- Terminal: the window or application that provides a place to interact with the shell.
In simple terms, the terminal window is the visible container, while the shell is the program inside it that interprets what you type. People often use “terminal” and “shell” casually to describe the same command-line session, but they are not exactly identical.
The graphical desktop lets you control the Raspberry Pi with windows, icons, menus, and a mouse. The terminal gives you more direct control by allowing you to name an operation precisely. Commands can launch programs, run scripts, create or manage files, and move between directories.
Terminal work is not a replacement for the graphical desktop. It is another way to perform tasks, and it becomes especially useful when a graphical option is unavailable, when an operation needs precise commands, or when you want to automate repeated work.
Terminal vocabulary
| Term | Meaning | Example or role |
|---|---|---|
| Terminal | A text-based application used to enter commands and view results. | LXTerminal provides the window. |
| Shell | The command interpreter that receives and runs commands. | The shell reads date. |
| Command-line interface | A text-based method of controlling an operating system. | You work by typing instructions. |
| Command | A typed instruction requesting an operation. | date asks for the system date and time. |
| Output | Text printed by a command. | The date and time line printed after date. |
LXTerminal in the Raspbian desktop
LXTerminal is the terminal application used in the Raspbian desktop environment. It opens a window where you enter commands and see the shell's output.
The experience is similar in purpose to Windows Command Prompt: both provide a text-based command interface. The commands and syntax are different, however. A command that works in Windows Command Prompt is not automatically the correct command for Raspbian or another Linux system.
Open LXTerminal
- Start the Raspberry Pi and sign in to the Raspbian graphical desktop.
- Look on the desktop panel for the terminal launcher. Its visual appearance may vary with the desktop theme and panel layout; identify it as the icon representing a terminal or command window.
- If you do not see the launcher, open the application menu and look for a terminal application, such as LXTerminal, in the system tools or accessories category.
- Select the launcher or menu entry to open LXTerminal.
A terminal window should appear with a line of text called the prompt and a cursor. The prompt means that the shell is ready to accept a command.
Read the shell prompt
A prompt can look similar to this:
pi@new-hostname:~ $This is an example only. The account name, hostname, directory, and formatting can differ on your Raspberry Pi.
| Prompt part | Example | Meaning |
|---|---|---|
| Username | pi | The name of the currently logged-in user account. pi is an example and is not guaranteed to be the account name on your system. |
| Hostname | new-hostname | The name assigned to the Raspberry Pi. It can identify the Pi locally or on a network. |
| Current directory indicator | ~ | A shortcut for the current user's home directory. |
| Prompt symbol | $ | A conventional marker for a standard, non-administrative user prompt. |
A home directory is the user's personal default directory. If the logged-in account is named pi, its home directory is commonly /home/pi/. Therefore, ~ represents /home/pi/ for that account. For another username, the home directory is commonly under /home/ with that username.
The final $ is supplied by the shell. It is not an instruction for you to type. You enter a command after the prompt, where the cursor is waiting.
What belongs in the command?
Given this prompt:
pi@new-hostname:~ $ dateOnly date is the command. Do not type pi@new-hostname:~ $; those characters are the prompt displayed by the shell.
Run your first command
The basic command-line cycle is:
- Read the prompt and place your attention after it.
- Type a command.
- Press Enter to submit the command to the shell.
- Read any output or error message.
- Wait for a new prompt, which indicates that the shell is ready for another command.
Display the date and time
The date command is a safe first example. It displays the Raspberry Pi's current system date and time.
dateType date after the prompt and press Enter. A result may look similar to this:
Wed Aug 19 14:30:00 UTC 2026The exact format and values depend on the system clock, time zone, and other configuration on your Raspberry Pi. After printing the line, the shell returns to a prompt, ready for another command.
Some commands display output immediately. A successful command may also display no output at all. If something goes wrong, the shell may print an error message instead of the expected result.
Troubleshooting the first command
The prompt does not match the example
This is normally expected. Your username, hostname, current directory, or prompt format may be different. A prompt that ends in a command-entry position can still be normal even when it does not look exactly like pi@new-hostname:~ $.
The date is incorrect
The Raspberry Pi's system clock, time zone, or network time synchronization may not be configured correctly. Check the Raspberry Pi date, time zone, and time-sync settings in a later system-configuration lesson.
No useful result appears
First check that you pressed Enter. Then compare the command with the example and look closely at any message printed by the shell. Some commands do not produce visible output when they succeed, so the returned prompt may itself be the expected result.
The prompt was typed as part of the command
The prompt is provided by the shell. Type only:
dateDo not type:
pi@new-hostname:~ $ dateWhat to learn next
This first command demonstrates the workflow used by many Linux commands: read the prompt, type an instruction, press Enter, inspect the result, and continue from the next prompt. Standard commands learned on Raspbian are also commonly used on other Linux distributions, including Ubuntu and Red Hat-family systems, although versions and available tools can vary.
As you continue, you can learn commands for navigating the Linux file system, managing files and directories, launching programs, running shell scripts, and working with users and permissions. Enter commands carefully and read the output before proceeding.
For a concise reminder of this lesson, return to Using the Terminal in Raspbian.