DevOps & Linux Administration

Linux Terminal & File System


Module II: Linux Terminal & File System. This module introduces the Linux command-line interface, terminal usage, Linux file system hierarchy, navigation commands, and essential concepts related to files and directories. These concepts form the foundation of Linux system administration and DevOps workflows.


What is the Linux Terminal?

The Linux terminal is a text-based interface through which users interact with the operating system using commands. Unlike graphical interfaces, the terminal provides faster and more powerful control over the system.

Most DevOps engineers, cloud administrators, and cybersecurity professionals heavily rely on terminal commands for automation, server management, and deployment tasks.

Terminal Workflow

User Types Command
Shell Interprets Command
Kernel Executes Request
Output Displayed to User

What is a Shell?

A shell is a command interpreter that acts as a bridge between the user and the Linux kernel. It reads commands entered by the user and passes them to the operating system for execution.

  • Bash – Most common Linux shell
  • Zsh – Advanced shell with customization
  • Fish – User-friendly interactive shell
  • Sh – Traditional Unix shell
ShellMain Feature
BashDefault shell in many Linux distributions
ZshHighly customizable and modern
FishBeginner-friendly with smart suggestions

Linux File System Structure

Linux organizes all files and directories in a hierarchical structure starting from the root directory represented by /.

Everything in Linux is treated as a file, including devices and system resources.

Linux Directory Hierarchy

/
/home
/bin
/etc
/var
DirectoryPurpose
/homeStores user files and personal data
/binEssential system commands and binaries
/etcConfiguration files
/varVariable data like logs and caches
/tmpTemporary files

Basic Navigation Commands

Linux provides commands to move between directories and manage files efficiently.

CommandPurpose
pwdShows current directory
lsLists files and folders
cdChanges directory
mkdirCreates new directory
touchCreates empty file

Example Terminal Session

$ pwd
/home/student

$ mkdir project

$ cd project

$ touch notes.txt

$ ls
notes.txt

Absolute Path vs Relative Path

Linux uses paths to locate files and directories.

Absolute Path

Starts from the root directory /.

/home/student/project

Relative Path

Defined relative to the current working directory.

./project

Types of Files in Linux

Linux supports different types of files for different purposes.

  • Regular Files – text files, images, programs
  • Directories – folders containing files
  • Symbolic Links – shortcuts to files
  • Device Files – hardware representations

Summary

In this chapter, we learned how the Linux terminal works, explored different shells, understood the Linux file system hierarchy, and studied important navigation commands used in everyday Linux administration and DevOps workflows.