Terminal, console, shell, and TTY
On this page
Suppose a guide for a desktop that stopped responding tells you: “Switch to a TTY, log in on the console, and type the command in the shell.” You have seen one place to type commands: the window that opened in lesson B02.3 when you pressed Ctrl+Alt+T. Was that window a TTY, a console, or a shell? And where do you type when the desktop is gone?
By the end of this lesson, you can say what each of the four words in the title names, read the prompt part by part, and follow that guide in your VM: switch to a console, log in, and come back to the desktop.
Before you start
Section titled “Before you start”- Desktop and session basics (B03.1). Start
rootvolt-laband log in aslearner. - This lesson runs two commands,
ttyandps. Type each one exactly as shown and press Enter. Module B04 explains how commands are built.
The screens were captured in Ubuntu 24.04.4 LTS in VirtualBox 7.2.18 on a Windows host, with the VM’s screen at 1440 × 900.
Open a terminal
Section titled “Open a terminal”Press Ctrl+Alt+T. On a Windows or Linux host, use the left Ctrl key: the right one is VirtualBox’s Host key. A window titled learner@rootvolt: ~ opens. In the tested VM, it held one line, with a cursor after it:
learner@rootvolt:~$If your VM shows a few lines of text above it, lesson B03.3 explains them.
This window is GNOME Terminal, Ubuntu’s default terminal. Its help calls it “a terminal emulator application for accessing a UNIX shell environment”. A terminal emulator is a program that draws a window that works like a text screen with a keyboard: it passes your keys to another program and shows the text that program sends back. GNOME Terminal itself does not understand commands.
The program that does is the shell: lesson B01.3 defined it as a program that reads the commands you type and starts the programs they name. The shell in this course is Bash. GNOME Terminal starts Bash when the window opens, and Bash prints the line above.
Read the prompt
Section titled “Read the prompt”That line is the prompt. The Bash manual says Bash shows it “when it is ready to read a command”. It has four parts:
| Part | Means |
|---|---|
learner |
The user you are logged in as |
rootvolt |
The computer’s name, which you chose in lesson B02.3 |
~ |
The directory you are in. ~ stands for your home directory, the folder that Files showed as Home in lesson B03.1 |
$ |
Bash is waiting for a command |
The @ and the : only separate the parts. A directory is what Files calls a folder; module B05 explains directories. The window’s title repeats the user, computer, and directory.
Ask for the terminal’s name
Section titled “Ask for the terminal’s name”Type this and press Enter:
ttyIn the tested VM, it printed:
learner@rootvolt:~$ tty/dev/pts/0tty prints the name of the terminal it is connected to. The answer is a file name, because the kernel gives every terminal a terminal device: a file in the directory /dev. GNOME Terminal and Bash talk through it. Your keys go into the device, and Bash reads them there; what Bash and its programs write to it appears in the window.
pts stands for pseudoterminal: a terminal device that the kernel creates for a program, not for a real screen and keyboard. Its manual page says pseudoterminals are used “for implementing terminal emulators”. The 0 is its number: /dev/pts/0 is the first one.
Now type this and press Enter:
psIn the tested VM, it printed:
learner@rootvolt:~$ ps PID TTY TIME CMD 3034 pts/0 00:00:00 bash 3097 pts/0 00:00:00 psps lists your programs that are running on this terminal. A running program is called a process, and PID is the number the kernel gives it; your numbers will differ. Module B13 explains processes. The TTY column names the terminal device without /dev/.
Look at the list again. bash is the shell behind your prompt, and ps was running while it made the list. GNOME Terminal is missing: it does not run on the terminal device, it holds the other end and draws the window.
Open a second window
Section titled “Open a second window”Leave the first window open and press Ctrl+Alt+T again. Guess first: what will tty print in the second window?
Run it, then compare with your guess
In the tested VM, the second window showed:
learner@rootvolt:~$ tty/dev/pts/1learner@rootvolt:~$Each terminal window gets its own pseudoterminal and its own Bash. That is also why, in lesson B04.2, each open terminal keeps its own history.
How the pieces connect
Section titled “How the pieces connect”In a terminal window, what you type goes from the keyboard to GNOME Terminal, the terminal emulator, and on to Bash, the shell. Bash starts the program that the command names, such as tty. The output, and Bash’s next prompt, go back to GNOME Terminal, which shows them in the window. On the text console, the next topic, the console takes the place of GNOME Terminal.
This is a simplified model. Most importantly, it leaves out the terminal device between the terminal and the shell, the name that tty prints: /dev/pts/0 for the first window, /dev/tty3 for the console.
Switch to the text console
Section titled “Switch to the text console”A text console, or console, is a terminal that the kernel provides directly on the screen and keyboard, with no desktop and no window. Linux has several, with the devices /dev/tty1, /dev/tty2, and so on.
Ctrl+Alt and a function key switch consoles, but on a Linux host, the VirtualBox manual warns, the host catches those keys. In a VM, use the Host key and the function key instead; the manual says this simulates “Ctrl+Alt+Fx to switch between virtual terminals in a Linux guest”. Virtual terminal is another name for a text console.
Press Host+F3: the right Ctrl key and F3, on a Windows or Linux host. VirtualBox sends Ctrl+Alt+F3 to the VM. On a Mac host, the Host key is the left Command key; this course was not tested on a Mac host.
The desktop disappears. In the tested VM, the screen turned black, with two lines at the top:

tty3: the console you are on, the device/dev/tty3.rootvolt login:: the console asks for your user name.
The first line names the release, the computer, and the console. There is no mouse pointer and no list of accounts: you type everything.
Log in on the console
Section titled “Log in on the console”Type learner and press Enter. The console shows Password:. Type your password and press Enter.
In the tested VM, nothing appeared while the password was typed, not even dots, and the login worked. That is normal on the console. The login looked like this:
Ubuntu 24.04.4 LTS rootvolt tty3
rootvolt login: learnerPassword:Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 7.0.0-42-generic x86_64)…learner@rootvolt:~$The … stands for more welcome text: links to Ubuntu’s documentation, a count of updates, and a license notice. The kernel version, 7.0.0-42-generic, and the number of updates vary between VMs.
Look at the last line: the same prompt as in the window. Bash is waiting again, this time on the console. Guess first: what will tty print here?
Run it, then compare with your guess
Run tty, then ps. In the tested VM, the console showed:
learner@rootvolt:~$ tty/dev/tty3learner@rootvolt:~$ ps PID TTY TIME CMD 3259 tty3 00:00:00 bash 3362 tty3 00:00:00 ps/dev/tty3, not a pts name: the console is not a pseudoterminal but a terminal device of the kernel’s own, the tty3 from the first line.
ps shows a bash with a different PID: a third Bash, started for this login. The shells in the windows are not listed, because ps lists only the processes on the terminal where you run it.
The console after these steps:

- The user name you typed, and
Password:, after which nothing appeared. - The kernel version. Yours may differ.
ttyprints/dev/tty3.pslistsbashandps, both ontty3.
Return to the desktop
Section titled “Return to the desktop”First, log out of the console. Type this and press Enter:
exitIn the tested VM, rootvolt login: appeared again: the console’s Bash ended.
Then press Host+F2: the right Ctrl key and F2. VirtualBox sends Ctrl+Alt+F2 to the VM, and in the tested VM the desktop came back.
Back to the guide
Section titled “Back to the guide”Now read the guide’s sentence again, word by word:
| Word | What it names | In your VM |
|---|---|---|
| Terminal | A place to type text and read text, on a screen or in a window. A terminal emulator, such as GNOME Terminal, provides one in a window | The windows from Ctrl+Alt+T |
| Console | A terminal that the kernel provides directly, without a desktop | The screen after Host+F3 |
| TTY | A terminal device, the file that tty prints |
/dev/pts/0, /dev/pts/1, /dev/tty3 |
| Shell | The program that reads your commands and starts the programs they name | Bash, in every one of them |
The kernel’s documentation spells TTY out as teletypewriter, and uses it for all terminal devices, pseudoterminals included. So “switch to a TTY, log in on the console” means one thing twice: switch to a text console, such as tty3, and log in there. “The shell” is Bash, behind the prompt in every terminal.
Mistakes to recognize
Section titled “Mistakes to recognize”The console seems frozen at Password:. You type, and nothing changes on the screen. The console does not show a password while you type it. Type the whole password and press Enter.
Stuck on the console. You want the desktop back, and the console shows a prompt or rootvolt login:. Typing exit does not help: it ends your login on the console, and rootvolt login: appears again. Press Host+F2, the right Ctrl key and F2, as in the tested VM.
Taking GNOME Shell for the shell. A guide says “type this in the shell”, and you type the command into the overview’s search box. That box belongs to GNOME Shell, the program that draws the desktop, which is not a shell despite its name. As in lesson B03.1, it searches for apps and settings; it does not run the command. Type the command at the Bash prompt in a terminal.
Try it yourself
Section titled “Try it yourself”Goal: Show that every terminal has its own Bash: two windows and one console.
- Open two terminal windows, if they are not still open, and run
psin each. - Write down the PID of
bashand the TTY in each window. - Switch to the console, log in, run
ps, and write down the same two values. - Log out of the console and return to the desktop.
Expected: Three different PIDs for bash, and three different TTY values: two pts names and tty3.
Hint
ps lists only the processes on the terminal where you run it. The console key is the Host key with F3; the way back is the Host key with F2.
Solution
- Press Ctrl+Alt+T twice, with the left Ctrl key, and run
psin each window. - Each list has one
bashline, with aptsname such aspts/0orpts/1; the numbers depend on how many windows are open. The PIDs differ. - Press Host+F3, log in as
learner, and runps. Thebashline showstty3and a third PID. - Type
exit, then press Host+F2.
Three terminals, three shells, each reading from its own terminal device.
- A terminal emulator such as GNOME Terminal draws a window, passes your keys to the shell, Bash, and shows what comes back. GNOME Shell draws the desktop; it is not a shell.
- The prompt
learner@rootvolt:~$shows the user, the computer, and the directory,~for your home directory;$means Bash is waiting for a command. - Every terminal has a terminal device, the name
ttyprints:/dev/pts/Nfor a terminal window,/dev/ttyNfor a console. TTY is the general word for them. - The text console is a terminal that the kernel provides without a desktop. In the VM, Host+F3 switches to
tty3,exitlogs out there, and Host+F2 brings the desktop back.
Next, in Regular users, root, and privileged actions (B03.3), you find out what the user learner may do, and which actions need more.
Further reading
Section titled “Further reading”All sources were checked on 3 November 2026, except the GNU Bash Reference Manual, which could not be reached that day.
- GNOME Terminal Help: Introduction, which describes Terminal as a terminal emulator.
- Ubuntu 24.04 manual pages: tty(1); ps(1), with the processes it lists by default and its columns; and bash(1), section PROMPTING, with the user, computer, and directory in the prompt.
- Linux manual pages: pts(4), on pseudoterminals and terminal emulators.
- GNU Bash Reference Manual: What is a shell? and Controlling the Prompt.
- Linux kernel documentation: Linux allocated devices, which lists
/dev/tty1as the “First virtual console” and/dev/pts/0as the first pseudo-TTY; and TTY, which spells out TTY as teletypewriter. - Oracle VirtualBox User Guide, release 7.2: Working with Virtual Machines, on the Host key and on Host key + function key for virtual terminals in a Linux guest.