Skip to content

First Login and Terminal

Learn how to log in to a Linux system, navigate the terminal, and execute your first Linux commands. The terminal is the primary interface used by Linux administrators, Cloud Engineers, DevOps Engineers, and Platform Engineers.


Learning Path

Linux Mastery → Module 1: Linux Fundamentals → Lesson 8

Difficulty: Beginner

Reading Time: 20 Minutes

Course Progress

Course: Linux Mastery

Module: Linux Fundamentals

Lesson: 8 of 10


What You'll Learn

After completing this lesson, you'll be able to:

  • Log in to a Linux system
  • Understand the Linux terminal
  • Differentiate Terminal, Shell, and Console
  • Execute basic Linux commands
  • Understand the Linux command prompt
  • Navigate directories
  • Exit the terminal safely

Prerequisites

Before starting this lesson, you should complete:

  • Linux Installation (VirtualBox, VMware & WSL)
  • Linux Boot Process

Why Learn the Linux Terminal?

One of the biggest surprises for beginners is that Linux professionals spend most of their time in the terminal.

While Linux Desktop provides a graphical interface, production Linux servers usually do not.

Cloud servers, Kubernetes nodes, Docker hosts, CI/CD runners, and enterprise Linux systems are managed almost entirely through the command line.

Learning the terminal is one of the most valuable Linux skills.


What is a Terminal?

A Terminal is an application that allows you to interact with the operating system by typing commands.

Instead of clicking icons, you type commands and receive immediate output.

User


Terminal


Shell


Linux Kernel


Hardware

The terminal acts as the communication bridge between you and Linux.


Terminal vs Shell vs Console

Many beginners use these terms interchangeably, but they have different meanings.

Component Description
Terminal Application used to enter commands
Shell Program that interprets commands
Console Physical or virtual interface connected to the system

Example:

GNOME Terminal


Bash Shell


Linux Kernel

The terminal displays the interface, while the shell processes your commands.


Logging into Linux

After starting your Linux machine, you'll see a login prompt.

Desktop:

Username:

Password:

Server:

Ubuntu 24.04 LTS

login:

Enter:

  • Username
  • Password

After successful authentication, Linux displays the command prompt.


Understanding the Command Prompt

Example:

basha@rebash:~$

Let's break it down.

Part Meaning
basha Logged-in user
rebash Computer hostname
~ Home directory
$ Normal user

If you log in as the root user, the prompt changes to:

root@server:~#

Notice the # symbol.


Your First Linux Commands

Let's execute a few simple commands.


Display Current User

whoami

Example output:

basha

Display Current Directory

pwd

Example:

/home/basha

List Files

ls

Detailed listing:

ls -la

Display Date

date

Display Calendar

cal

Display System Information

uname -a

Display Linux Distribution

cat /etc/os-release

Running Multiple Commands

Commands can be executed one after another.

Example:

pwd

ls

date

Or on a single line:

pwd && ls && date

Each command runs only if the previous one succeeds.


Understanding Command Syntax

Most Linux commands follow this structure:

command [options] [arguments]

Example:

ls -la /home

Breakdown:

Part Meaning
ls Command
-la Options
/home Argument

Getting Help

Linux includes built-in documentation.

Display command help:

ls --help

Manual pages:

man ls

Search manual pages:

man man

Learning to use the manual pages is an essential Linux skill.


Clearing the Terminal

To clear the screen:

clear

Keyboard shortcut:

Ctrl + L

Command History

Linux remembers previously executed commands.

View history:

history

Navigate using:

  • ↑ Up Arrow
  • ↓ Down Arrow

Search history:

Ctrl + R

This saves time and improves productivity.


Keyboard Shortcuts

Shortcut Purpose
Ctrl + C Stop running command
Ctrl + D Logout
Ctrl + L Clear terminal
Ctrl + R Search history
Tab Auto-complete
Previous command
Next command

Learning these shortcuts makes terminal usage much faster.


Production Perspective

Cloud engineers rarely use graphical interfaces.

Typical production workflow:

Laptop


SSH


Linux Server


Docker


Kubernetes


Cloud Infrastructure

Everything begins with the Linux terminal.

Whether you're managing:

  • AWS EC2
  • Azure VM
  • Google Compute Engine
  • Kubernetes Node

you'll use the terminal every day.


Hands-on Lab

Run the following commands.

Display current user:

whoami

Display hostname:

hostname

Display current directory:

pwd

List all files:

ls -la

Display Linux version:

cat /etc/os-release

Display kernel version:

uname -r

Display current date:

date

Display command history:

history

Try using the Tab key to auto-complete commands.


Best Practices

  • Practice using the terminal every day.
  • Learn keyboard shortcuts.
  • Read command manual pages.
  • Avoid memorizing commands—understand what they do.
  • Use Tab completion to reduce typing errors.

Common Mistakes

❌ Thinking Linux requires a graphical interface.

✅ Most production Linux servers are managed entirely from the terminal.


❌ Memorizing commands without understanding them.

✅ Learn command syntax and options instead.


❌ Logging in as the root user for everyday work.

✅ Use a regular user account and elevate privileges only when necessary.


Interview Questions

Beginner

  1. What is a Linux Terminal?
  2. What is a Shell?
  3. What is the difference between Terminal and Shell?
  4. Which command displays the current directory?
  5. Which command displays the logged-in user?

Intermediate

  1. Explain Linux command syntax.
  2. How do you access command documentation?
  3. How does command history improve productivity?
  4. Why is the terminal preferred in production?

Architect Level

  1. Why do cloud engineers primarily use the terminal?
  2. How does terminal-based administration improve scalability?
  3. What are the security advantages of remote terminal administration?

Summary

In this lesson, you learned:

  • How to log in to Linux
  • What the terminal is
  • The difference between Terminal, Shell, and Console
  • Your first Linux commands
  • Command syntax
  • Command history
  • Essential keyboard shortcuts

The Linux terminal is the primary tool you'll use throughout this course and your professional career.


Key Takeaways

  • The terminal is the primary interface for Linux administration.
  • The shell interprets your commands.
  • Most production Linux servers do not have a graphical interface.
  • Learning command-line basics is the first step toward becoming a Linux professional.
  • Practice is the fastest way to become comfortable with the terminal.

What's Next?

Linux Directory Structure (Filesystem Hierarchy Standard - FHS)

In the next lesson, you'll learn:

  • Linux filesystem hierarchy
  • Root directory (/)
  • Home directories
  • System directories
  • Configuration files
  • Temporary storage
  • Best practices for navigating the Linux filesystem