Quick reference

The course, at a glance.

A compact view of the canonical command library. Open an example for its full instructions and safety context.

Navigation & files

Text & pipelines

  • cd ~/linux-practice

    Overwrite and append · safe · Full example

  • ls missing-file 2> error.log

    Capture errors · safe · Full example

  • cat << 'EOF' > document.txt

    Use a heredoc · safe · Full example

  • cd ~/linux-practice

    Sort and count · safe · Full example

  • echo 'Hello World' | tr 'a-z' 'A-Z'

    Translate characters · safe · Full example

  • echo 'Name:Age:City' > people.txt

    Cut and align fields · safe · Full example

  • cd ~/linux-practice

    Basic grep · safe · Full example

  • grep '^A' fruits.txt

    Regex anchors · safe · Full example

  • mkdir -p projects/search-demo

    Recursive search · safe · Full example

  • cd ~/linux-practice

    Substitute safely · safe · Full example

  • sed -n '2p' text.txt

    Print selected lines · safe · Full example

  • sed -i.bak 's/Hello/Hi/g' text.txt

    In-place with backup · caution · Full example

  • cd ~/linux-practice

    Print fields · safe · Full example

  • echo -e 'Product,Price,Quantity\nApple,1.50,100\nBanana,0.75,200' > inventory.csv

    CSV separator · safe · Full example

  • awk -F, 'NR>1 {total += $2 * $3} END {print total}' inventory.csv

    Total calculation · safe · Full example

Safety & control

  • cd ~/linux-practice

    Create search lab · safe · Full example

  • find find-lab -name '*.txt'

    Find files · safe · Full example

  • find find-lab -name '*.txt' -exec ls -lh {} \;

    Act on results · safe · Full example

  • find find-lab -name '*.log' -delete

    Delete only after printing · caution · Full example

  • cd ~/linux-practice

    Practice chmod · safe · Full example

  • echo 'echo Hello' > scripts/hello.sh

    Make a script executable · safe · Full example

  • chmod u+s /usr/bin/passwd

    System special bits example · explanation-only · Full example

  • cd ~/linux-practice

    Who am I? · read-only · Full example

  • touch owned-by-me.txt

    Inspect ownership · read-only · Full example

  • sudo chown username:groupname file.txt

    Optional admin ownership examples · optional-admin · Full example

  • ps

    View processes · read-only · Full example

  • cd ~/linux-practice

    Create and stop a practice job · caution · Full example

  • killall sleep

    Broad process killing examples · caution · Full example

  • printenv | head -20

    Inspect variables · read-only · Full example

  • export MY_NAME='Linux Learner'

    Export a temporary variable · safe · Full example

  • mkdir -p ~/linux-practice/bin

    Practice PATH safely · safe · Full example

  • command -v ls

    Find the command your shell will run · read-only · Full example

Applied workflows

System & network

  • cd ~/linux-practice

    Measure sandbox · safe · Full example

  • df -h /

    Filesystem free space · read-only · Full example

  • lsblk

    Observe block devices · read-only · Full example

  • apt search 'text editor' | head -20

    Read-only package search · read-only · Full example

  • command -v apt || true

    Detect your package manager · read-only · Full example

  • dpkg -l | head -20

    Inspect installed files · read-only · Full example

  • sudo apt update

    Optional install/remove pattern · optional-admin · Full example

  • ping -c 2 8.8.8.8

    Connectivity checks · read-only · Full example

  • getent hosts example.com

    Check DNS separately from connectivity · read-only · Full example

  • mkdir -p ~/linux-practice/downloads

    Fetch a web page · safe · Full example

  • ip addr show | head -30

    Inspect network info · read-only · Full example

  • free -h

    Memory and uptime · read-only · Full example

  • top -b -n 1 | head -20

    Process snapshots · read-only · Full example

  • if command -v journalctl >/dev/null && [ "$(ps -p 1 -o comm=)" = systemd ]; then

    Logs and watch · read-only · Full example

Automation

Check before you copy

This command needs care. Read its context, confirm the target and location, and keep a recovery path.

Copying does not run a command.