100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Bash

Linux & Shell Quick Reference

A condensed cheat sheet consolidating the most frequently used Linux commands, Bash syntax, and shortcuts covered throughout this course for fast lookup.

Interview PrepBeginner9 min readJul 9, 2026
Analogies

Linux & Shell Quick Reference

This reference consolidates the highest-frequency commands and syntax patterns from across the course into one scannable page. It is intentionally terse — the goal is fast lookup during real work, not re-teaching concepts already covered in depth elsewhere. Each subsection groups related commands so you can jump directly to filesystem navigation, text processing, process management, permissions, or Bash scripting syntax without hunting through prose.

🏏

Cricket analogy: This section is like a cricket almanac's quick-stats page — not full match reports, just career averages and records grouped by batting, bowling, and fielding so you can look up a fact fast during a broadcast.

Filesystem Navigation and File Operations

These commands form the backbone of interactive shell use: moving around the tree, inspecting metadata, and manipulating files and directories.

🏏

Cricket analogy: These are the basics every player drills first — footwork, grip, and stance — the fundamentals you use in every single innings before anything fancier.

bash
pwd                          # print working directory
cd /path/to/dir              # change directory
cd -                         # go to previous directory
cd ~                         # go to home directory
ls -lah                      # long listing, all files, human-readable sizes
find /var/log -name "*.log" -mtime +7   # files matching name, older than 7 days
locate nginx.conf            # fast indexed search (requires updatedb)
cp -r src/ dest/              # copy recursively
mv old_name new_name          # move or rename
rm -rf dir/                   # remove recursively, forced (dangerous)
mkdir -p a/b/c                # create nested directories
ln -s /path/target linkname   # create symbolic link
tar -czvf archive.tar.gz dir/ # create compressed archive
tar -xzvf archive.tar.gz      # extract compressed archive

Text Processing and Searching

The core Unix text toolkit — grep, sed, awk, sort, cut, and friends — combined via pipes to filter, transform, and summarize data streams.

🏏

Cricket analogy: grep is like scanning the scorecard for every over bowled by a specific bowler; sed is like correcting a misprinted player's name across the whole scoresheet; awk is like calculating strike rate from raw ball-by-ball columns, and piping them together builds a full analysis from raw match data.

bash
grep -rn "TODO" ./src/        # recursive, line-numbered search
grep -v "^#"  config.conf     # invert match, exclude comment lines
sed 's/foo/bar/g' file.txt    # replace all occurrences of foo with bar
sed -i.bak 's/old/new/' f.txt # in-place edit with backup file
awk -F',' '{print $1, $3}' data.csv   # print columns 1 and 3, comma-delimited
sort -k2 -n file.txt          # sort numerically by 2nd field
cut -d':' -f1 /etc/passwd     # extract 1st colon-delimited field
uniq -c                       # count adjacent duplicate lines (pair with sort first)
wc -l file.txt                # count lines
tail -f /var/log/syslog       # follow a growing file live
xargs -I{} rm {}              # build/execute commands from stdin

Processes, Permissions, and System Info

Commands for inspecting and controlling running processes, managing ownership and access, and checking system resource usage.

🏏

Cricket analogy: These tools are like a team analyst checking who's currently batting, who's authorized to make bowling changes, and how much stamina the bowlers have left in the tank.

bash
ps aux | grep nginx            # list processes matching 'nginx'
top / htop                     # live process/resource monitor
kill -15 <pid>                 # graceful termination (SIGTERM)
kill -9 <pid>                  # forceful termination (SIGKILL)
nohup ./long_task.sh &         # run in background, immune to hangup
jobs -l                        # list background jobs in current shell
chmod 755 script.sh            # rwxr-xr-x
chmod u+x script.sh            # add execute for owner only
chown user:group file.txt      # change owner and group
sudo -l                        # list current user's sudo privileges
df -h                          # filesystem free space
du -sh dir/                    # total size of a directory
free -h                        # memory usage
uptime                         # load average and uptime

GNU tools (found on most Linux distros) and BSD tools (found on macOS by default) diverge in flag behavior — most notably sed -i requires a backup suffix argument on BSD/macOS (sed -i '' 's/a/b/') but not on GNU/Linux (sed -i 's/a/b/'). Scripts intended to be portable across both should either detect the platform or use sed -i.bak consistently, which works on both (leaving a .bak file to clean up).

Bash Scripting Syntax Cheat Sheet

The syntax patterns used in nearly every non-trivial script: conditionals, loops, functions, and parameter handling.

🏏

Cricket analogy: This is the playbook of decision rules a captain uses in nearly every match — when to review, when to rotate bowlers, and set fielding routines — the recurring patterns behind almost every tactical call.

bash
#!/usr/bin/env bash
set -euo pipefail

# Variables and quoting
name="World"
echo "Hello, $name!"

# Conditionals
if [[ -f "$1" ]]; then
    echo "File exists"
elif [[ -d "$1" ]]; then
    echo "Directory exists"
else
    echo "Not found"
fi

# Loops
for f in *.log; do
    echo "Processing $f"
done

while read -r line; do
    echo "$line"
done < input.txt

# Functions
greet() {
    local who="$1"
    echo "Hi, $who"
}
greet "Alice"

# Arrays
fruits=("apple" "banana" "cherry")
echo "${fruits[@]}"       # all elements
echo "${#fruits[@]}"      # array length

# Command-line args and getopts
while getopts "f:v" opt; do
    case "$opt" in
        f) file="$OPTARG" ;;
        v) verbose=1 ;;
        *) echo "Usage: $0 [-f file] [-v]"; exit 1 ;;
    esac
done

# Exit codes
command_that_might_fail
echo "Exit status: $?"

Networking, Package Management, and Scheduling

Quick-reference commands for the operational tasks that come up outside of pure file/text manipulation: checking connectivity, managing packages, and scheduling recurring jobs.

🏏

Cricket analogy: These are the ground-logistics tasks beyond the actual match — checking the pitch report, ordering new equipment, and scheduling the next fixture.

bash
# Networking
ip a                            # show network interfaces and addresses
ss -tulpn                       # listening TCP/UDP sockets with process info
ping -c 4 example.com           # test connectivity, 4 packets
curl -I https://example.com     # fetch HTTP headers only
ssh user@host                   # remote shell
scp file.txt user@host:/path/   # copy file to remote host

# Package management (Debian/Ubuntu vs RHEL/CentOS)
sudo apt update && sudo apt install -y curl   # Debian/Ubuntu
sudo yum install -y curl                       # RHEL/CentOS (older)
sudo dnf install -y curl                       # RHEL/Fedora (newer)

# Scheduling
crontab -e                       # edit current user's crontab
crontab -l                       # list current user's cron jobs
# m h dom mon dow command
0 3 * * * /opt/scripts/backup.sh >> /var/log/backup.log 2>&1

systemctl status nginx           # check service status
systemctl restart nginx          # restart a service
systemctl enable nginx           # enable service at boot
journalctl -u nginx -f           # follow logs for a service

This page is a memory aid, not a substitute for reading the full lessons on each topic — flags like chmod 755 or rm -rf are dangerous when copy-pasted without understanding what they do in your specific context. Always confirm the target path/permissions before running destructive or permission-altering commands, especially when adapting an example from a cheat sheet to a live production system.

  • This page is organized by task category (navigation, text processing, processes/permissions, scripting syntax, networking/packages/scheduling) for fast lookup.
  • grep, sed, awk, sort, cut, and uniq combined via pipes cover the vast majority of everyday text-processing needs.
  • chmod/chown control permissions and ownership; ps/top/kill control process inspection and lifecycle; df/du/free cover resource usage.
  • A safe Bash script header is #!/usr/bin/env bash plus set -euo pipefail, with all variable expansions quoted.
  • Package management commands differ by distro family: apt for Debian/Ubuntu, yum/dnf for RHEL/CentOS/Fedora.
  • Always verify destructive commands (rm -rf, chmod, kill -9) against the specific context before running them — a cheat sheet is a memory aid, not a substitute for understanding.

Practice what you learned

Was this page helpful?

Topics covered

#Bash#LinuxShellScriptingStudyNotes#DevOps#LinuxShellQuickReference#Linux#Shell#Quick#Reference#StudyNotes#SkillVeris

Frequently Asked Questions

21 categories · pick one to explore

Where can I get free study notes for programming and tech subjects?
SkillVeris offers completely free study notes covering programming and tech subjects, with no signup fees or paywalls. The notes are structured by course and topic, written for quick understanding, and enriched with the Learn Through Hobbies analogy method, so you can revise concepts through cricket, music, gaming, cooking and more.
Are SkillVeris study notes good for exam revision?
Yes, the study notes are designed for efficient revision: each topic answers its heading immediately, keeps explanations concise, and links to related glossary terms and cheat sheets. Students preparing for university exams or certification tests use them as quick revision notes because they distil concepts without the padding of full textbooks.
What subjects do the free study notes cover?
The study notes span the platform's main domains, including AI and machine learning, Python and programming, web development, DevOps, cloud, security and databases. Coverage mirrors the 37 live courses, so notes exist for the topics you are actually studying, and new note sets are added as courses launch.
How are SkillVeris study notes different from regular textbooks?
The notes are answer-first, concise and free, whereas textbooks are long and often expensive. Each section explains one concept directly, then reinforces it through selectable hobby analogies like cricket or cooking. Notes also cross-link to the glossary, blog and cheat sheets, letting you jump to related material instantly instead of flipping pages.
Can I use the developer study material without creating an account?
The study notes are free to access, and SkillVeris does not charge anything for its developer study material at any point. Browsing notes is straightforward from the Study Notes section, and if you want progress tracking, certificates and AI Mentor conversations tied to your learning, a free account unlocks those extras.
Do the study notes explain concepts with analogies?
Yes, this is a signature SkillVeris feature. Study notes use the Learn Through Hobbies method, explaining technical concepts through analogies from twelve domains including cricket, music, gaming, photography, travel, movies, fitness, chess, cooking, finance, business and sports. You can switch the analogy domain instantly to whichever hobby makes the concept click.
Are the revision notes suitable for last-minute exam preparation?
Yes, revision notes on SkillVeris work well for last-minute preparation because every section states the answer in its first sentences, so skimming is genuinely effective. Pair them with the relevant cheat sheet for formulas and syntax, and use the glossary for any unfamiliar term you meet while cramming.
Is there free study material for AI and machine learning?
Yes, SkillVeris provides free study notes across its AI and ML catalogue, covering Python for AI, deep learning frameworks like PyTorch and TensorFlow, Hugging Face Transformers, Large Language Models, RAG, AI agents and MLOps. All of it is free, making it a strong resource for Indian students and global learners alike.
Can beginners understand the study notes, or are they for experts?
Beginners can absolutely use them. The notes are written in plain language, define terms as they appear, and lean on hobby analogies to make abstract ideas concrete. Difficulty scales with the underlying course level, so beginner-course notes stay gentle while advanced-course notes go deeper, and the glossary supports you throughout.
How do study notes connect with SkillVeris courses?
Study notes are organised by course and topic, so they map directly to the structured courses and their 24–40-lesson curriculum. Many learners study a lesson first, then use the matching notes for revision before module assessments and the final exam, where 80 percent is required to pass and earn the certificate.
Are there study notes for Python specifically?
Yes, Python is well covered through notes tied to the Python-focused courses, including Python for AI and ML. Topics span fundamentals through applied machine learning usage. You can reinforce the notes with Python practice in Code Lab, which runs code in your browser with no installation required.
Do the study notes include code examples?
Yes, study notes include code examples wherever a concept is best shown in code, alongside explanations, key points and analogies. Reading a snippet in the notes and then reproducing it yourself in Code Lab is an effective loop, since Code Lab lets you run code in the browser across six languages.
How often is new study material added to SkillVeris?
Study material grows alongside the course catalogue. Whenever new courses join the platform's 37 live courses, matching study notes, glossary entries and cheat sheets are added so the resources stay in sync. Existing notes are also refined over time, so it is worth revisiting topics you studied earlier.
Can I use SkillVeris notes to prepare for technical interviews?
Yes, the notes make excellent interview revision because they compress each concept into direct, answer-first explanations, which mirrors how you should answer interview questions. Combine them with the SkillVeris interview questions feature, which includes readiness scoring, to test whether your revision has actually made you interview-ready.
Are the study notes mobile-friendly for studying on the go?
Yes, the study notes are built to load fast and read comfortably on mobile devices, so you can revise during a commute or between classes. Sections are short and answer-first, which suits small screens, and analogy switching works on mobile too, letting you study anywhere without carrying books.
What is the difference between study notes and cheat sheets?
Study notes explain concepts in depth with context, examples and analogies, making them ideal for learning and revision. Cheat sheets are compact quick-reference summaries of syntax, commands and key facts, ideal once you already understand a topic. Most learners study the notes first, then keep the cheat sheet handy while coding.
Do study notes help if I am stuck on a course lesson?
Yes, reading the matching study notes often clarifies a lesson because the same concept is explained from a different angle, frequently with a different analogy. If you are still stuck, ask the AI Mentor, which answers 24/7 at Quick, Detailed or Deep-dive depth until the idea genuinely makes sense.
Is there free study material for DevOps and cloud topics?
Yes, SkillVeris carries free study notes for DevOps and cloud topics as part of its coverage across 37 live courses. The material suits learners following the DevOps Engineer or Cloud Engineer paths, and it links to related glossary terms and cheat sheets so you can revise the whole toolchain in one place.
Can school or college students in India use these notes for projects?
Yes, students across India and worldwide use SkillVeris notes for coursework, projects and exam preparation, and everything is free, which matters for student budgets. The notes explain concepts clearly enough to cite in project reports, and Code Lab lets you prototype the project code directly in your browser.
How should I combine study notes with other SkillVeris resources?
A proven loop: learn from a course lesson, revise with the matching study notes, look up unfamiliar terms in the glossary, keep the cheat sheet open while practising in Code Lab, and quiz yourself with interview questions. The AI Mentor fills any remaining gaps 24/7, at whatever depth you need.

What Learners Say

Real journeys from the SkillVeris community — swipe for more.

SkillVeris taught me Python through Cricket. Now I’m building real projects and feeling confident!
Arjun S. · B.Tech Student
The best platform for hobby-based learning. Concepts finally stick.
Priya R. · Data Analyst
I went from zero coding to a portfolio of projects — all by learning through my love for gaming. Landed my first internship!
Kabir M. · CS Undergraduate
Trending Topics50 popular tags — tap to explore
Trending CoursesAll 37 free courses — tap to browse