1. Introduction

Linux is an open-source operating system widely used for servers, development, cloud computing, and embedded systems. It’s powerful due to its command-line interface (CLI), flexibility, and security.


2. Command Line Basics

The terminal or CLI is where you type commands to interact with the system.

Common Commands

Command Description
pwd Print current working directory
ls List files and directories
cd <dir> Change directory
mkdir <dir> Create a directory
touch <file> Create an empty file
cp <src> <dest> Copy file/directory
mv <src> <dest> Move/rename file/directory
rm <file> Remove file
rm -r <dir> Remove directory recursively
cat <file> View file content
less <file> View file content page by page
echo "text" Display text or write to file
find <path> -name <filename> Search files by name
grep "text" <file> Search text in files
history Show command history
man <command> Show manual/help page

3. File Permissions

Linux is a multi-user OS. Every file/directory has permissions controlling who can read, write, or execute it.

Permission Structure

-rwxr-xr--

Numeric Representation

Permission Value
read (r) 4
write (w) 2
execute (x) 1