Skip to content

Chapter 1 of 7

Introduction to the Linux Command Line

The Linux command line interface (CLI) is a text-based environment for interacting with the operating system by typing commands into a terminal emulator. Unlike a graphical user interface, which relies on windows, icons, and pointer-based actions, the CLI lets users accomplish tasks by issuing precise textual instructions, often faster and more reproducibly than their GUI equivalents.

Behind the CLI sits a shell — a program that reads each command, interprets it, and asks the Linux kernel to perform the corresponding action. The most common shell on Linux distributions is Bash (the Bourne Again SHell), which provides features like command history, tab completion, and scripting. Other shells such as Zsh or Fish exist, but Bash remains the default for most systems and is the focus of this textbook.

To begin using the CLI, you launch a terminal, which opens a shell session. On Ubuntu and many other distributions, pressing Ctrl+Alt+T opens a default terminal immediately. Alternatively, you can search for "Terminal" in the applications menu. Once the terminal is open, you are presented with a prompt where you can begin typing commands.

All chapters
  1. 1Introduction to the Linux Command Line
  2. 2Navigating and Managing the Filesystem
  3. 3Inspecting and Editing Files
  4. 4Permissions, Searching, and Data Flow
  5. 5Processes, Resources, and Shell Customization
  6. 6Networking and Package Management
  7. 7Archiving, Compression, and Automation

Drill it

Reading is not remembering. These come from the Linux Command Line deck:

Q

What is the Linux command line interface (CLI)?

The Linux CLI is a text-based interface for interacting with the operating system using commands entered via a terminal emulator, allowing users to perform task...

Q

What is a shell in Linux?

A shell is a program that interprets commands entered into the CLI, processes them, and communicates with the kernel; common shells include Bash (Bourne Again S...

Q

How do you open a terminal in Linux?

Use keyboard shortcuts like Ctrl+Alt+T on Ubuntu or search for 'Terminal' in the applications menu; it launches a shell session for command execution.

Q

What does the <code>pwd</code> command do?

The pwd (Print Working Directory) command displays the absolute path of the current working directory, helping users confirm their location in the filesystem.