π Linux Command Handbook
Essential Linux Commands for Software Engineers β’ DevOps β’ Cloud β’ Software Architects
π¦ Chunk 1 (Commands 1β50)
Linux Fundamentals
π Category 1: Navigation & Paths (Commands 1β8)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 1 |
pwd
|
Displays absolute path of current working directory. |
pwd
|
| 2 |
ls
|
Lists files and directories in current location. |
ls
|
| 3 |
ls -l
|
Lists files with detailed information and permissions. |
ls -l
|
| 4 |
ls -la
|
Lists all files including hidden ones. |
ls -la
|
| 5 |
cd
|
Changes current directory to specified destination path. |
cd /home/user
|
| 6 |
cd ..
|
Moves one directory level above current location. |
cd ..
|
| 7 |
cd -
|
Switches directly to current user's home directory. |
cd -
|
| 8 |
tree
|
Displays directory structure in hierarchical tree format. |
tree
|
π Category 2: Files & Directories (Commands 9β22)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 9 |
mkdir
|
Creates one or multiple new directories. |
mkdir project
|
| 10 |
mkdir -p
|
Creates nested directories without intermediate errors. |
mkdir -p app/src
|
| 11 |
rmdir
|
Removes empty directory from the filesystem safely. |
rmdir temp
|
| 12 |
touch
|
Creates empty file or updates file timestamp. |
touch index.html
|
| 13 |
cp
|
Copies files or directories to another location. |
cp file.txt backup/
|
| 14 |
cp -r
|
Copies directories recursively with all contents included. |
cp -r app backup
|
| 15 |
mv
|
Moves or renames files and directories efficiently. |
mv old.txt new.txt
|
| 16 |
rm
|
Permanently removes files from the filesystem. |
rm notes.txt
|
| 17 |
rm -r
|
Recursively removes directories and their contents. |
rm -r temp
|
| 18 |
rm -rf
|
Forcefully removes directories without confirmation prompts. |
rm -rf build
|
| 19 |
ln
|
Creates hard links between filesystem objects. |
ln file.txt link.txt
|
| 20 |
ln -s
|
Creates symbolic links pointing to target files. |
ln -s app shortcut
|
| 21 |
stat
|
Displays detailed metadata about specified filesystem objects. |
stat app.log
|
| 22 |
file
|
Identifies actual file type using content analysis. |
file image.png
|
π Category 3: Viewing Files (Commands 23β30)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 23 |
cat
|
Displays complete contents of specified text files. |
cat notes.txt
|
| 24 |
less
|
Views large files interactively one page at time. |
less app.log
|
| 25 |
more
|
Displays file contents one screen at time. |
more data.txt
|
| 26 |
head
|
Displays first ten lines of specified file. |
head app.log
|
| 27 |
head -n
|
Displays specified number of initial file lines. |
head -20 app.log
|
| 28 |
tail
|
Displays last ten lines of specified file. |
tail app.log
|
| 29 |
tail -f
|
Continuously monitors appended data in log files. |
tail -f nginx.log
|
| 30 |
nl
|
Displays file contents with line numbers included. |
nl notes.txt
|
π Category 4: Searching & Text Processing (Commands 31β45)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 31 |
find
|
Searches files and directories using specified search criteria. |
find . -name "*.log"
|
| 32 |
locate
|
Quickly finds files using indexed system database. |
locate nginx.conf
|
| 33 |
grep
|
Searches matching text patterns within files efficiently. |
grep "error" app.log
|
| 34 |
grep -r
|
Recursively searches matching text inside directories. |
grep -r "TODO" src/
|
| 35 |
awk
|
Processes structured text using pattern-action programming. |
awk '{print $1}' file.txt
|
| 36 |
sed
|
Edits and transforms text streams automatically. |
sed 's/old/new/g' file.txt
|
| 37 |
sort
|
Sorts text lines alphabetically or numerically ascending. |
sort names.txt
|
| 38 |
uniq
|
Removes adjacent duplicate lines from sorted output. |
sort file.txt | uniq
|
| 39 |
cut
|
Extracts selected columns or character ranges efficiently. |
cut -d: -f1 /etc/passwd
|
| 40 |
tr
|
Translates or deletes specified input characters. |
echo "abc" | tr a-z A-Z
|
| 41 |
wc
|
Counts lines, words, characters, and bytes accurately. |
wc -l app.log
|
| 42 |
tee
|
Writes command output to file and terminal. |
ls | tee files.txt
|
| 43 |
xargs
|
Builds command arguments from standard input stream. |
find . -name "*.log" | xargs rm
|
| 44 |
diff
|
Compares two files and shows line differences. |
diff old.txt new.txt
|
| 45 |
paste
|
Merges corresponding lines from multiple input files. |
paste file1.txt file2.txt
|
π Category 5: Help & Documentation (Commands 46β50)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 46 |
man
|
Displays complete manual page for specified command. |
man grep
|
| 47 |
--help
|
Shows quick command usage and available options. |
ls --help
|
| 48 |
which
|
Displays executable location found in system PATH. |
which python3
|
| 49 |
whereis
|
Locates binary, source, and manual page files. |
whereis ssh
|
| 50 |
history
|
Displays previously executed terminal commands chronologically. |
history
|
Chunk 1 Complete (Commands 1β50)
Covered Categories:
- π Navigation & Paths (1β8)
- π Files & Directories (9β22)
- π Viewing Files (23β30)
- π Searching & Text Processing (31β45)
- π Help & Documentation (46β50)
The next chunk will continue with the same formatting, starting from Command #51 under Linux Administration.
π¦ Chunk 2 (Commands 51β100)
Linux Administration
π Category 6: File Permissions & Ownership (Commands 51β60)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 51 |
chmod
|
Changes file or directory access permissions securely. |
chmod 755 script.sh
|
| 52 |
chmod +x
|
Grants executable permission to specified file. |
chmod +x deploy.sh
|
| 53 |
chmod -R
|
Recursively changes permissions for entire directory. |
chmod -R 755 project/
|
| 54 |
chown
|
Changes file or directory ownership to user. |
chown ubuntu app.log
|
| 55 |
chown -R
|
Recursively changes ownership of directory contents. |
chown -R nginx:nginx /var/www
|
| 56 |
chgrp
|
Changes group ownership of specified files. |
chgrp developers app.log
|
| 57 |
umask
|
Sets default permissions for newly created files. |
umask 022
|
| 58 |
getfacl
|
Displays Access Control Lists for files. |
getfacl app.log
|
| 59 |
setfacl
|
Configures Access Control Lists on files. |
setfacl -m u:john:rwx file.txt
|
| 60 |
ls -l
|
Displays permissions, ownership, and detailed file information. |
ls -l
|
π€ Category 7: User & Group Management (Commands 61β75)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 61 |
whoami
|
Displays username of currently logged-in user. |
whoami
|
| 62 |
id
|
Displays user ID and group memberships. |
id
|
| 63 |
who
|
Lists users currently logged into system. |
who
|
| 64 |
groups
|
Displays groups associated with current user. |
groups
|
| 65 |
useradd
|
Creates a new user account securely. |
sudo useradd alok
|
| 66 |
adduser
|
Creates user account with interactive prompts. |
sudo adduser alok
|
| 67 |
passwd
|
Sets or changes user account password. |
passwd alok
|
| 68 |
usermod
|
Modifies existing user account properties safely. |
usermod -aG sudo alok
|
| 69 |
userdel
|
Deletes user account from the system. |
userdel alok
|
| 70 |
groupadd
|
Creates a new user group. |
groupadd developers
|
| 71 |
groupmod
|
Modifies existing user group properties. |
groupmod developers
|
| 72 |
groupdel
|
Deletes an existing user group. |
groupdel developers
|
| 73 |
su
|
Switches current session to another user. |
su root
|
| 74 |
sudo
|
Executes commands with administrative privileges safely. |
sudo apt update
|
| 75 |
visudo
|
Safely edits sudoers configuration without syntax errors. |
sudo visudo
|
βοΈ Category 8: Process Management (Commands 76β90)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 76 |
ps
|
Displays currently running processes with details. |
ps
|
| 77 |
ps -ef
|
Displays all running system processes comprehensively. |
ps -ef
|
| 78 |
top
|
Monitors running processes and resource usage live. |
top
|
| 79 |
htop
|
Provides interactive real-time process management interface. |
htop
|
| 80 |
kill
|
Terminates process using specified process identifier. |
kill 1234
|
| 81 |
kill -9
|
Forcefully terminates unresponsive running process immediately. |
kill -9 1234
|
| 82 |
pkill
|
Terminates processes matching specified process name. |
pkill nginx
|
| 83 |
killall
|
Terminates all processes with matching name. |
killall chrome
|
| 84 |
jobs
|
Lists background jobs in current shell session. |
jobs
|
| 85 |
bg
|
Resumes stopped job execution in background. |
bg %1
|
| 86 |
fg
|
Brings background job into foreground execution. |
fg %1
|
| 87 |
nohup
|
Keeps process running after terminal logout. |
nohup java -jar app.jar &
|
| 88 |
nice
|
Starts process with adjusted CPU priority. |
nice -10 script.sh
|
| 89 |
renice
|
Changes CPU priority of running processes. |
renice 5 1234
|
| 90 |
pidof
|
Displays process identifier for specified program. |
pidof nginx
|
π» Category 9: System Information (Commands 91β100)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 91 |
uname
|
Displays basic operating system kernel information. |
uname -a
|
| 92 |
hostname
|
Displays current system hostname or network name. |
hostname
|
| 93 |
hostnamectl
|
Displays or modifies system hostname configuration. |
hostnamectl
|
| 94 |
uptime
|
Shows system running duration and load averages. |
uptime
|
| 95 |
date
|
Displays or sets current system date. |
date
|
| 96 |
cal
|
Displays calendar for specified month or year. |
cal
|
| 97 |
free
|
Displays system memory and swap usage. |
free -h
|
| 98 |
lscpu
|
Displays detailed processor architecture and information. |
lscpu
|
| 99 |
lsmem
|
Displays installed physical memory layout information. |
lsmem
|
| 100 |
env
|
Displays all current environment variables available. |
env
|
Chunk 2 Complete (Commands 51β100)
Covered Categories:
- π File Permissions & Ownership (51β60)
- π€ User & Group Management (61β75)
- βοΈ Process Management (76β90)
- π» System Information (91β100)
π¦ Chunk 3 (Commands 101β150)
Server Administration
πΎ Category 10: Disk & Storage Management (Commands 101β112)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 101 |
df
|
Displays filesystem disk space usage statistics. |
df -h
|
| 102 |
du
|
Displays disk usage for files and directories. |
du -sh project/
|
| 103 |
lsblk
|
Lists available block storage devices and partitions. |
lsblk
|
| 104 |
blkid
|
Displays filesystem UUIDs and partition information. |
sudo blkid
|
| 105 |
fdisk
|
Creates, deletes, and manages disk partitions. |
sudo fdisk /dev/sda
|
| 106 |
mount
|
Mounts filesystem to specified directory location. |
sudo mount /dev/sdb1 /mnt
|
| 107 |
umount
|
Safely unmounts mounted filesystem from directory. |
sudo umount /mnt
|
| 108 |
mkfs
|
Creates filesystem on specified storage partition. |
sudo mkfs.ext4 /dev/sdb1
|
| 109 |
fsck
|
Checks and repairs filesystem consistency errors. |
sudo fsck /dev/sdb1
|
| 110 |
sync
|
Flushes filesystem buffers to physical storage safely. |
sync
|
| 111 |
dd
|
Copies and converts files or disk images. |
dd if=/dev/sda of=backup.img
|
| 112 |
mountpoint
|
Checks whether directory is mounted filesystem. |
mountpoint /mnt
|
π Category 11: Networking (Commands 113β132)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 113 |
ip
|
Configures and displays network interface information. |
ip addr
|
| 114 |
ping
|
Tests network connectivity with remote host. |
ping google.com
|
| 115 |
traceroute
|
Displays network path packets travel through. |
traceroute google.com
|
| 116 |
tracepath
|
Traces packet route without administrative privileges. |
tracepath google.com
|
| 117 |
ss
|
Displays active network sockets and connections. |
ss -tuln
|
| 118 |
netstat
|
Displays network connections, routes, and statistics. |
netstat -tuln
|
| 119 |
curl
|
Transfers data from or to remote servers. |
curl https://example.com
|
| 120 |
wget
|
Downloads files directly from internet servers. |
wget https://example.com/file.zip
|
| 121 |
scp
|
Securely copies files between remote systems. |
scp file.txt user@host:/home/user
|
| 122 |
rsync
|
Efficiently synchronizes files between local or remote systems. |
rsync -av src/ backup/
|
| 123 |
ssh
|
Securely connects to remote Linux servers. |
ssh user@server
|
| 124 |
sftp
|
Securely transfers files using SSH protocol. |
sftp user@server
|
| 125 |
dig
|
Queries DNS servers for domain information. |
dig google.com
|
| 126 |
nslookup
|
Looks up domain names and IP addresses. |
nslookup google.com
|
| 127 |
host
|
Resolves hostnames into corresponding IP addresses. |
host google.com
|
| 128 |
hostname -I
|
Displays all assigned local IP addresses. |
hostname -I
|
| 129 |
arp
|
Displays and manages Address Resolution Protocol cache. |
arp -a
|
| 130 |
route
|
Displays or modifies kernel routing table. |
route -n
|
| 131 |
nc
|
Tests network ports and transfers raw data. |
nc -zv localhost 80
|
| 132 |
telnet
|
Connects to remote services for connectivity testing. |
telnet localhost 80
|
π¦ Category 12: Package Management (Commands 133β140)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 133 |
apt
|
Installs, removes, and manages Debian packages. |
sudo apt install nginx
|
| 134 |
apt update
|
Updates package repository metadata from servers. |
sudo apt update
|
| 135 |
apt upgrade
|
Upgrades installed packages to latest versions. |
sudo apt upgrade
|
| 136 |
apt remove
|
Removes installed package while preserving configuration. |
sudo apt remove nginx
|
| 137 |
apt purge
|
Completely removes package including configuration files. |
sudo apt purge nginx
|
| 138 |
dpkg
|
Installs or manages local Debian package files. |
sudo dpkg -i app.deb
|
| 139 |
yum
|
Manages packages on RHEL and CentOS systems. |
sudo yum install httpd
|
| 140 |
dnf
|
Modern package manager replacing yum on Fedora. |
sudo dnf install nginx
|
π Category 13: Services & Log Management (Commands 141β150)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 141 |
systemctl
|
Manages system services and startup behavior. |
systemctl status nginx
|
| 142 |
systemctl start
|
Starts specified service immediately on system. |
sudo systemctl start nginx
|
| 143 |
systemctl stop
|
Stops specified running service safely. |
sudo systemctl stop nginx
|
| 144 |
systemctl restart
|
Restarts specified service to apply changes. |
sudo systemctl restart nginx
|
| 145 |
systemctl enable
|
Enables service to start during boot. |
sudo systemctl enable nginx
|
| 146 |
systemctl disable
|
Prevents service from starting during boot. |
sudo systemctl disable nginx
|
| 147 |
journalctl
|
Displays logs collected by systemd journal service. |
journalctl -u nginx
|
| 148 |
dmesg
|
Displays Linux kernel boot and hardware messages. |
dmesg
|
| 149 |
watch
|
Repeatedly executes command and refreshes output. |
watch df -h
|
| 150 |
lsof
|
Lists files currently opened by running processes. |
lsof -i :80
|
Chunk 3 Complete (Commands 101β150)
Covered Categories:
- πΎ Disk & Storage Management (101β112)
- π Networking (113β132)
- π¦ Package Management (133β140)
- π Services & Log Management (141β150)
π¦ Chunk 4A (Commands 151β175)
DevOps Foundations
β° Category 14: Scheduling & Automation (Commands 151β162)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 151 |
crontab
|
Manages scheduled tasks for current user account. |
crontab -e
|
| 152 |
crontab -e
|
Opens current user's cron table for editing. |
crontab -e
|
| 153 |
crontab -l
|
Lists all scheduled cron jobs for user. |
crontab -l
|
| 154 |
crontab -r
|
Removes all scheduled cron jobs permanently. |
crontab -r
|
| 155 |
cron
|
Executes scheduled background tasks automatically every minute. |
sudo systemctl status cron
|
| 156 |
at
|
Schedules one-time command execution at specified time. |
at 10:30 PM
|
| 157 |
atq
|
Lists all pending one-time scheduled jobs. |
atq
|
| 158 |
atrm
|
Removes specified pending scheduled job safely. |
atrm 2
|
| 159 |
batch
|
Executes commands automatically when system load decreases. |
batch
|
| 160 |
sleep
|
Pauses command execution for specified duration. |
sleep 10
|
| 161 |
time
|
Measures execution duration of specified command accurately. |
time ls -la
|
| 162 |
timeout
|
Stops command after specified execution time expires. |
timeout 30 ping google.com
|
π Category 15: Shell & Environment (Commands 163β175)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 163 |
echo
|
Prints text or variable values to terminal. |
echo "Hello Linux"
|
| 164 |
printf
|
Prints formatted output using specified format string. |
printf "%s\n" "Hello"
|
| 165 |
export
|
Sets environment variables for current shell session. |
export JAVA_HOME=/usr/lib/jvm/java-21
|
| 166 |
unset
|
Removes specified environment variable from current session. |
unset JAVA_HOME
|
| 167 |
env
|
Displays or runs commands with custom environment. |
env
|
| 168 |
printenv
|
Displays current environment variables and assigned values. |
printenv PATH
|
| 169 |
alias
|
Creates shortcut for frequently used shell commands. |
alias ll='ls -la'
|
| 170 |
unalias
|
Removes previously created shell command alias. |
unalias ll
|
| 171 |
source
|
Reloads shell configuration without restarting terminal. |
source ~/.bashrc
|
| 172 |
history
|
Displays previously executed shell commands chronologically. |
history
|
| 173 |
clear
|
Clears previous output from terminal screen completely. |
clear
|
| 174 |
reset
|
Resets terminal settings and clears corrupted display. |
reset
|
| 175 |
exit
|
Terminates current shell session or terminal window. |
exit
|
Chunk 4A Complete (Commands 151β175)
Covered Categories:
- β° Category 14: Scheduling & Automation (151β162)
- π Category 15: Shell & Environment (163β175)
Next: π¦ Chunk 4B (Commands 176β205) β Complete Git Essentials (30 Commands) covering configuration, branching, merging, rebasing, remotes, recovery, and collaboration.
π¦ Chunk 4B (Commands 176β205)
Developer Essentials
π³ Category 16: Git Essentials (Commands 176β205)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 176 |
git config
|
Configures Git username, email, and default settings. |
git config --global user.name "Alok"
|
| 177 |
git init
|
Initializes new Git repository in current directory. |
git init
|
| 178 |
git clone
|
Downloads remote repository into local machine. |
git clone https://github.com/user/repo.git
|
| 179 |
git status
|
Displays repository status and pending file changes. |
git status
|
| 180 |
git add
|
Stages selected files for next commit. |
git add .
|
| 181 |
git restore
|
Restores modified files to previous state. |
git restore app.js
|
| 182 |
git commit
|
Saves staged changes into repository history permanently. |
git commit -m "Initial commit"
|
| 183 |
git log
|
Displays complete commit history in chronological order. |
git log --oneline
|
| 184 |
git show
|
Displays detailed information about specific commit. |
git show HEAD
|
| 185 |
git diff
|
Shows differences between files, commits, or branches. |
git diff
|
| 186 |
git branch
|
Lists, creates, or deletes Git branches. |
git branch
|
| 187 |
git switch
|
Switches current working branch safely. |
git switch main
|
| 188 |
git checkout
|
Switches branches or restores tracked files. |
git checkout feature-login
|
| 189 |
git merge
|
Combines another branch into current branch. |
git merge feature-login
|
| 190 |
git rebase
|
Reapplies commits onto another branch history. |
git rebase main
|
| 191 |
git stash
|
Temporarily stores uncommitted working directory changes. |
git stash
|
| 192 |
git stash pop
|
Restores latest stashed changes and removes stash. |
git stash pop
|
| 193 |
git fetch
|
Downloads latest remote changes without merging. |
git fetch origin
|
| 194 |
git pull
|
Fetches and merges latest remote repository changes. |
git pull origin main
|
| 195 |
git push
|
Uploads local commits to remote repository. |
git push origin main
|
| 196 |
git remote
|
Manages remote repository connections and URLs. |
git remote -v
|
| 197 |
git tag
|
Creates, lists, or deletes version tags. |
git tag v1.0.0
|
| 198 |
git reset
|
Moves HEAD and optionally unstages changes. |
git reset HEAD~1
|
| 199 |
git revert
|
Creates new commit reversing previous commit. |
git revert HEAD
|
| 200 |
git clean
|
Removes untracked files and directories safely. |
git clean -fd
|
| 201 |
git cherry-pick
|
Applies selected commit onto current branch. |
git cherry-pick a1b2c3d
|
| 202 |
git blame
|
Shows line-by-line commit and author information. |
git blame app.js
|
| 203 |
git reflog
|
Displays reference history for HEAD movements. |
git reflog
|
| 204 |
git bisect
|
Finds commit introducing bug using binary search. |
git bisect start
|
| 205 |
git cherry
|
Compares commits between local and upstream branches. |
git cherry -v
|
Chunk 4B Complete (Commands 176β205)
Covered Categories:
- π³ Category 16: Git Essentials (176β205)
This Git section now covers the complete day-to-day workflow expected of software engineers and DevOps professionals, including configuration, staging, commits, branching, merging, rebasing, remotes, recovery, debugging, and collaboration.
Next: π¦ Chunk 4C (Commands 206β220) β SSH & Security Essentials (15 Commands).
π¦ Chunk 4C (Commands 206β220)
Security & Remote Administration
π Category 17: SSH & Security (Commands 206β220)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 206 |
ssh
|
Securely connects to remote Linux servers over SSH. |
ssh ubuntu@192.168.1.10
|
| 207 |
ssh-keygen
|
Generates secure public and private SSH key pairs. |
ssh-keygen -t ed25519
|
| 208 |
ssh-copy-id
|
Copies public SSH key to remote server. |
ssh-copy-id ubuntu@server
|
| 209 |
scp
|
Securely copies files between local and remote systems. |
scp app.jar user@server:/opt/apps
|
| 210 |
sftp
|
Securely transfers files using SSH file transfer. |
sftp user@server
|
| 211 |
ssh-agent
|
Manages SSH private keys for authentication sessions. |
eval $(ssh-agent -s)
|
| 212 |
ssh-add
|
Adds private keys to running SSH agent. |
ssh-add ~/.ssh/id_ed25519
|
| 213 |
openssl
|
Generates certificates and performs cryptographic operations securely. |
openssl version
|
| 214 |
gpg
|
Encrypts, decrypts, and digitally signs sensitive files. |
gpg -c secrets.txt
|
| 215 |
base64
|
Encodes or decodes data using Base64 encoding. |
echo "Hello" | base64
|
| 216 |
sha256sum
|
Calculates SHA-256 checksum for integrity verification. |
sha256sum app.zip
|
| 217 |
sha512sum
|
Calculates SHA-512 checksum for stronger integrity verification. |
sha512sum app.zip
|
| 218 |
md5sum
|
Calculates MD5 checksum for quick file comparison. |
md5sum app.zip
|
| 219 |
hostnamectl
|
Displays or changes system hostname configuration safely. |
hostnamectl set-hostname web-server
|
| 220 |
timedatectl
|
Displays or configures system date and timezone. |
timedatectl status
|
Chunk 4C Complete (Commands 206β220)
Covered Categories:
- π Category 17: SSH & Security (206β220)
Notes
hostnamectlandtimedatectlare included because they're common administrative commands you'll use while provisioning Linux servers in cloud environments.- Core SSH workflow is fully covered:
- Remote login (
ssh) - Key generation (
ssh-keygen) - Key deployment (
ssh-copy-id) - Secure copy (
scp) - File transfer (
sftp) - Key management (
ssh-agent,ssh-add)
- Remote login (
- Common cryptographic and integrity tools are included:
opensslgpgbase64sha256sumsha512summd5sum
Next: π¦ Chunk 4D (Commands 221β245) β Docker Essentials (25 Commands), covering the complete day-to-day Docker workflow used in DevOps and cloud environments.
π¦ Chunk 4D (Commands 221β245)
Docker Essentials
Note:
π³ Category 18: Docker Essentials (Commands 221β245)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 221 |
docker version
|
Displays Docker client and server version information. |
docker version
|
| 222 |
docker info
|
Displays detailed Docker engine configuration and status. |
docker info
|
| 223 |
docker login
|
Authenticates with Docker registry using credentials. |
docker login
|
| 224 |
docker logout
|
Removes stored Docker registry authentication credentials. |
docker logout
|
| 225 |
docker search
|
Searches Docker Hub for available container images. |
docker search nginx
|
| 226 |
docker pull
|
Downloads container image from Docker registry. |
docker pull nginx
|
| 227 |
docker images
|
Lists locally available Docker container images. |
docker images
|
| 228 |
docker build
|
Builds Docker image from Dockerfile instructions. |
docker build -t myapp .
|
| 229 |
docker tag
|
Assigns new name or tag to image. |
docker tag myapp:latest myapp:v1
|
| 230 |
docker push
|
Uploads Docker image to remote registry. |
docker push username/myapp:v1
|
| 231 |
docker run
|
Creates and starts new Docker container. |
docker run -d nginx
|
| 232 |
docker ps
|
Lists currently running Docker containers only. |
docker ps
|
| 233 |
docker ps -a
|
Lists all Docker containers including stopped ones. |
docker ps -a
|
| 234 |
docker exec
|
Executes command inside running Docker container. |
docker exec -it web bash
|
| 235 |
docker logs
|
Displays logs generated by Docker container. |
docker logs web
|
| 236 |
docker inspect
|
Displays detailed metadata about Docker objects. |
docker inspect web
|
| 237 |
docker stop
|
Stops running Docker container gracefully. |
docker stop web
|
| 238 |
docker start
|
Starts previously stopped Docker container. |
docker start web
|
| 239 |
docker restart
|
Restarts Docker container without manual intervention. |
docker restart web
|
| 240 |
docker rm
|
Removes stopped Docker container permanently. |
docker rm web
|
| 241 |
docker rmi
|
Removes unused Docker images from local storage. |
docker rmi nginx
|
| 242 |
docker network
|
Creates, lists, and manages Docker networks. |
docker network ls
|
| 243 |
docker volume
|
Creates and manages persistent Docker volumes. |
docker volume ls
|
| 244 |
docker compose
|
Defines and runs multi-container Docker applications. |
docker compose up -d
|
| 245 |
docker system
|
Manages Docker system resources and cleanup. |
docker system prune
|
Chunk 4D Complete (Commands 221β245)
Covered Topics:
- Docker installation verification
- Image management
- Registry operations
- Container lifecycle
- Container inspection
- Networks
- Volumes
- Docker Compose
- Docker cleanup
This set covers the core day-to-day Docker workflow used in professional
development and DevOps. Advanced subcommands (such as docker cp,
docker stats,
docker events,
docker save,
docker load,
and docker image
/ docker container
namespaces) are useful but are used less frequently than the commands above.
Next: π¦ Chunk 4E (Commands 246β265) β Kubernetes & Cloud Utilities,
covering kubectl,
Helm, and JSON/YAML processing tools commonly used in cloud-native environments.
π¦ Chunk 4E (Commands 246β265)
Kubernetes & Cloud Utilities
Note:
kubectl),
Helm, and utilities like jq
/ yq
are not built into Linux, but they are essential tools for modern DevOps, Cloud, and
Platform Engineers.
βΈοΈ Category 19: Kubernetes & Cloud Utilities (Commands 246β265)
| # | Command | Short Definition (6β10 words) | Example |
|---|---|---|---|
| 246 |
kubectl config
|
Manages Kubernetes cluster contexts and credentials. |
kubectl config get-contexts
|
| 247 |
kubectl get
|
Lists Kubernetes resources from selected namespace. |
kubectl get pods
|
| 248 |
kubectl describe
|
Displays detailed information about Kubernetes resources. |
kubectl describe pod nginx
|
| 249 |
kubectl apply
|
Creates or updates resources from manifest files. |
kubectl apply -f deployment.yaml
|
| 250 |
kubectl delete
|
Removes Kubernetes resources from current cluster. |
kubectl delete pod nginx
|
| 251 |
kubectl logs
|
Displays logs generated by Kubernetes containers. |
kubectl logs nginx
|
| 252 |
kubectl exec
|
Executes commands inside running Kubernetes containers. |
kubectl exec -it nginx -- bash
|
| 253 |
kubectl top
|
Displays CPU and memory usage metrics. |
kubectl top pods
|
| 254 |
kubectl scale
|
Changes replica count for Kubernetes workloads. |
kubectl scale deployment web --replicas=3
|
| 255 |
kubectl rollout
|
Manages deployment rollouts and rollback operations. |
kubectl rollout status deployment/web
|
| 256 |
kubectl expose
|
Creates Kubernetes Service for application access. |
kubectl expose deployment web --port=80
|
| 257 |
kubectl port-forward
|
Forwards local ports to Kubernetes resources. |
kubectl port-forward pod/nginx 8080:80
|
| 258 |
kubectl edit
|
Edits Kubernetes resources using default editor. |
kubectl edit deployment web
|
| 259 |
helm install
|
Installs Kubernetes applications using Helm charts. |
helm install web nginx
|
| 260 |
helm upgrade
|
Upgrades existing Helm release to newer version. |
helm upgrade web nginx
|
| 261 |
helm uninstall
|
Removes Helm release from Kubernetes cluster. |
helm uninstall web
|
| 262 |
helm list
|
Lists installed Helm releases in cluster. |
helm list
|
| 263 |
jq
|
Processes and filters JSON data efficiently. |
kubectl get pods -o json | jq '.items[].metadata.name'
|
| 264 |
yq
|
Processes and edits YAML configuration files. |
yq '.spec.replicas' deployment.yaml
|
| 265 |
watch
|
Continuously monitors changing Kubernetes command outputs. |
watch kubectl get pods
|
β Linux Command Handbook Complete (Commands 1β265)
π Final Coverage
| Chunk | Commands | Topics |
|---|---|---|
| Chunk 1 | 1β50 | Navigation, Files, Viewing, Text Processing, Help |
| Chunk 2 | 51β100 | Permissions, Users, Processes, System Information |
| Chunk 3 | 101β150 | Storage, Networking, Packages, Services, Logs |
| Chunk 4A | 151β175 | Scheduling, Automation, Shell Environment |
| Chunk 4B | 176β205 | Complete Git Workflow |
| Chunk 4C | 206β220 | SSH, Security, Encryption, Checksums |
| Chunk 4D | 221β245 | Docker Essentials |
| Chunk 4E | 246β265 | Kubernetes, Helm, JSON/YAML Utilities |
π― Skills Covered
This handbook prepares you for day-to-day work in:
- Software Engineering
- Full Stack Development
- DevOps Engineering
- Cloud Engineering (AWS, Azure, GCP)
- Site Reliability Engineering (SRE)
- Software Architecture
- Linux System Administration
Overall, this is a solid practical reference focused on the commands you'll encounter most often in development, deployment, automation, containerization, orchestration, and production troubleshooting.