Skip to content

Click on each book below to review & buy on Amazon.

As an Amazon Associate, I earn from qualifying purchases.


LPI Linux Essentials Exam 010-160 - Topic 1.4 - Terminal & Console

Shell Prompt/Terminal

A shell prompt, also known as a command prompt or terminal, is a text-based interface in a computer operating system that allows users to interact with the system using commands. It provides a command line where users can type commands and receive text-based output in response.

The shell prompt serves as a gateway to the operating system's command-line interface (CLI). It enables users to execute various commands, run programs, navigate through directories, manage files, configure system settings, and perform a wide range of tasks on their computer.

When you open a shell prompt or terminal, you are presented with a blank screen and a blinking cursor. This indicates that the system is ready to accept your input. You can then type commands, press Enter, and the system will interpret and execute those commands.

The shell prompt typically displays information to provide context and assist the user. This information may include the username, hostname, current directory, and a specific symbol (often a dollar sign $ or a hash symbol #) indicating that the system is awaiting input.

To access a shell prompt using Gnome (Red Hat 9 example below), click on Activities in the top left corner. Then you can either search for terminal or click on the terminal icon on the bottom bar if present.

shell-prompt-01

Console

The Linux console, often referred to as a text console, serves as a primary interface for users to interact with the Linux operating system using text-based commands. This text-based interface is distinct from graphical user interfaces (GUIs) and relies on textual input and output for communication.

Historically the console was associated with physical terminal devices connected to a computer, but in modern systems, most consoles are virtual terminals (TTYs). Users can switch between these virtual terminals by using keyboard shortcuts such as Ctrl+Left Alt+F3 through Ctrl+Left Alt+F6. Alternatively, the chvt command can be used instead of the keyboard shortcuts, for example chvt 3 is the same as Ctrl+Left Alt+F3.

Exercise: Switch between virtual terminals and graphical console.

Switch to virtual terminal console 6:

Ctrl+Left Alt+F6

Enter your username and password to log in.

Switch back to your original virtual terminal console:

Ctrl+Left Alt+F2

Switch to virtual terminal console 5:

Ctrl+Left Alt+F5

Enter your username and password to log in.

This time use the chvt command to return to your original virtual terminal console:

chvt 2

Support DTV Linux

Click on each book below to review & buy on Amazon. As an Amazon Associate, I earn from qualifying purchases.

NordVPN ®: Elevate your online privacy and security. Grab our Special Offer to safeguard your data on public Wi-Fi and secure your devices. I may earn a commission on purchases made through this link.