Updated - The Complete Linux Reference Guide
Updated - The Complete Linux Reference Guide
Guide
By: OutDatedBiskut
Document Contents
Document Contents
2|Page
Document Contents
3|Page
Document Contents
~An old saying goes like, "Drop by drop, a river is formed" — the same goes for knowledge.
Don't let technical words intimidate you ;)
4|Page
Module 1: File Management Essentials
Commands covered:
ls - Lists directory contents, showing files and folders in the current directory. Using -l shows
details like permissions and size, -a shows hidden files, and -h shows file sizes in human-
readable format.
• Example: ls -la ~ lists all files in your home directory with details
cd - Changes your current directory location. Use cd ~ to go to home directory, cd / for root,
and cd .. to move up one directory.
• Usage: cd [directory]
• Example: cd /home/user/documents
pwd - Prints the full path of your current working directory, showing exactly where you are in
the filesystem.
• Usage: pwd
cp - Copies files or directories from one location to another. The -r option copies directories
recursively including all contents.
5|Page
Module 1: File Management Essentials
mv - Moves or renames files and directories. It works both for relocating files and for
changing filenames.
rm - Removes (deletes) files or directories. Be careful with -rf which forces removal of
directories and their contents without confirmation.
mkdir - Creates new directories. The -p option creates parent directories as needed.
rmdir - Removes empty directories only (will fail if directory contains files).
ln - Creates links between files. The -s option creates symbolic links (shortcuts) rather than
hard links.
6|Page
Module 1: File Management Essentials
find - Searches for files and directories based on various criteria like name, size, or type.
• Key options: -name (by name), -type (by type, e.g., f for file)
• Example: find . -name "*.txt" finds all text files in current directory
Practice Exercise: Create a directory structure for a web project with folders for HTML,
CSS, and JavaScript files. Practice creating, moving, and linking files within this structure.
7|Page
Module 2 : System Information and Monitoring
Commands covered:
uname Displays system information like kernel version and hardware architecture.
• Usage: hostname
• Usage: whoami
df - Reports disk space usage for mounted filesystems, showing available and used space.
• Usage: df [options]
du - Estimates file and directory space usage, helping identify what's taking up disk space.
free - Shows memory usage, including free and used RAM and swap space.
8|Page
Module 2 : System Information and Monitoring
top - Monitors system processes in real-time, showing CPU, memory usage, and running
processes.
• Usage: htop
uptime - Shows how long the system has been running and the current load average.
• Usage: uptime
• Usage: lscpu
lsblk - Lists all block devices (like hard drives and their partitions).
Practice Exercise: Write a simple script that collects system information including CPU
model, memory usage, disk space, and system uptime, then formats the output in a
readable report.
9|Page
Module 3: Networking Tools and Techniques
Commands covered:
ping - Tests connectivity to another host by sending data packets and measuring response
time.
• Usage: ss [options]
10 | P a g e
Module 3: Networking Tools and Techniques
wget - Downloads files from the web via HTTP, HTTPS, or FTP.
curl - Transfers data to or from servers using various protocols, with more options than
wget.
traceroute - Shows the network path packets take to reach a destination host.
Practice Exercise: Set up SSH key-based authentication for secure passwordless login
to a remote server. Then create a script that downloads a file from the web and uploads it
to your remote server.
11 | P a g e
Module 4: Process Management
Commands covered:
ps - Lists running processes. The aux option shows all processes with detailed information.
• Usage: ps [options]
12 | P a g e
Module 4: Process Management
• Usage: bg [job_id]
• Usage: fg [job_id]
• Usage: jobs
Practice Exercise: Write a script that monitors CPU usage of specific applications and
alerts you when usage exceeds 80% for more than one minute. Include options to
automatically adjust the priority of resource-intensive processes
13 | P a g e
Module 5: User and Group Management
Commands covered:
useradd - Creates a new user account.
14 | P a g e
Module 5: User and Group Management
Practice Exercise: Set up a shared project environment where multiple users belong to
the same group and can collaboratively edit files in a shared directory. Configure
permissions to ensure security while enabling collaboration.
15 | P a g e
Module 6: Package Management
Commands covered:
apt - Package management tool for Debian-based distributions (Ubuntu, Mint).
16 | P a g e
Module 6: Package Management
Practice Exercise: Create a script that automatically installs your preferred software
environment on a fresh Linux installation. Include error handling and checks to ensure
compatibility with multiple distributions.
17 | P a g e
Module 7: Text Processing and Manipulation
Commands covered:
cat - Concatenate and display files
tail - Shows the end (last lines) of a file. The -f option lets you follow file updates in real-
time.
18 | P a g e
Module 7: Text Processing and Manipulation
awk - Powerful text processing tool for extracting and manipulating data.
19 | P a g e
Module 7: Text Processing and Manipulation
Practice Exercise: Process a large log file to extract specific information, sort it, count
occurrences, and generate a summary report. Create a pipeline that combines multiple
text processing commands.
20 | P a g e
Module 8: Disk Management
Commands covered:
fdisk - Partition table manipulator
21 | P a g e
Module 8: Disk Management
Practice Exercise: Create a script that automates the process of partitioning a new disk,
formatting it with an appropriate file system, and mounting it with optimal parameters.
Include error checking and validation.
22 | P a g e
Module 9: File Permissions and Ownership
Commands covered:
chmod - Change file permissions
Practice Exercise: Set up a secure file sharing system where different users have
appropriate access levels to specific directories. Document the permission structure and
justify your choices.
23 | P a g e
Module 10: Compression and Archiving
Commands covered:
tar - Archive files
24 | P a g e
Module 10: Compression and Archiving
Practice Exercise: Create a backup system that uses compression to efficiently store
daily, weekly, and monthly backups with rotation. Compare the efficiency of different
compression methods for various file types.
25 | P a g e
Module 11: Environment Variables and Shell Configuration
Commands covered:
export - Set environment variables
26 | P a g e
Module 12: Shell Scripting Essentials
Commands covered:
test or [ - Evaluate conditional expressions
• Usage: [ expression ]
Practice Exercise: Create a utility script that processes command-line arguments and
performs operations on files or directories. Include error handling, help messages, and
proper exit codes.
27 | P a g e
Module 13: System Logs and Monitoring
Commands covered:
dmesg - Print kernel ring buffer messages
28 | P a g e
Module 13: System Logs and Monitoring
Practice Exercise: Create a monitoring script that collects system metrics over time,
alerts on abnormal conditions, and generates daily reports on system performance and
resource usage.
29 | P a g e
Module 14: File Comparison and Merging
30 | P a g e
Module 14: File Comparison and Merging
Practice Exercise: Create a simple version control system that tracks changes to
configuration files, allows reverting to previous versions, and shows differences between
versions
31 | P a g e
Module 15: System Exploration Tools
Commands covered:
whereis - Locate the binary, source, and manual for a command
Practice Exercise: Create a script that builds a searchable database of useful command
examples from your personal usage history, allowing you to quickly find commands you've
used before.
32 | P a g e
Final Project: Linux System Administration Toolkit
Requirements:
Deliverables:
This project showcases your linux skills commands and your ability to solve real-world
system administration problems.
33 | P a g e
Honorable and worthy mentions
It’s not spoon-fed, and that’s the point. You’ll Google a lot. You’ll fail a bit. That’s
how you know you’re learning. If you can make it through Bandit and still want more,
the other "Wargames" on the site ramp up fast and furious. Start with curiosity,
finish with competence.
• DistroWatch.com : if you’re trying to wrap your head around the Linux ecosystem,
this is your radar. It tracks hundreds of active (and defunct) Linux and BSD
distributions, giving you the lowdown on who’s doing what, when, and how. From
release dates to package managers and desktop environments, it’s a central hub to
compare distros before diving in. The Page Hit Ranking gives a decent pulse on
what’s trending. Whether you aree distro-hopping or just distro-curious, this is
where you start mapping the terrain if you are completely new.
• r/linux & r/linux4noobs : might lose some karma along the way, but you’ll find
community tips, distro drama, and the occasional gold nugget. Great for staying
plugged into the culture.
34 | P a g e