TodayTools

Terminal and shell basics flashcards

Move around, find anything, fix servers and automate the boring parts from the command line.

Donate
Beginner friendly, starts from zero
Section
How to study
0
Terminal and shell basicsStart from zero · 1 of 12

What is the , in one plain sentence?

A window where you control the computer by typing short text lines instead of clicking icons.

Texting your computer instead of pointing at it.
Show again
12 left
Got it

Tap to turn over. Swipe right if you know it, left to see it again.

All topics

What you will learn

  1. Start from zero

    • What the terminal is4 cards
    • The key words5 cards
    • Getting ready3 cards
  2. Core basics

    • Shell and keyboard4 cards
    • Paths and moving around4 cards
    • Files and folders4 cards
    • Reading files and getting help3 cards
    • Safe habits2 cards
  3. Next steps

    • Pipes and redirection3 cards
    • Searching and disk space3 cards
    • Permissions and ownership4 cards
    • Processes and jobs3 cards
    • Environment and shell setup4 cards
    • Services, packages and archives4 cards
  4. Go deeper

    • Bash scripting7 cards
    • Text, data and batch processing5 cards
    • Remote servers3 cards
    • Scheduling, ports and networking3 cards

Final test and certificate

10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.

Take the final test

About these cards

  • Reviewed 26 October 2026
  • CoversBash 5.3GNU coreutils 9.12Ubuntu 26.04 LTS and 24.04 LTSmacOS zsh notes where they differ
How these cards are made

Terminal and shell basics at a glance

The terminal lets you control a computer by typing short commands instead of clicking.

Like a phone line to a helpful operator: you say exactly what you want, and the shell makes it happen.

Words you will meet

Terminal
The text window where you type
Shell
The program that reads your typed line and runs it
Command
One typed instruction, like ls
Path
The address of a file or folder, folder by folder
Flag
An option that changes how a command works, like -l
Argument
The thing a command works on, like a file name
SSH
A safe way to log in to another computer and type there
Root
The all-powerful admin user; sudo borrows its power

The steps

  1. 1. Start from zero (12 cards): What the terminal is, the key words in plain English, and your first commands.
  2. 2. Core basics (17 cards): Where you are, files and folders, reading files, help, history and the keys that save hours.
  3. 3. Next steps (21 cards): Pipes and redirects, search, permissions, processes, environment, jobs, disk and line editing.
  4. 4. Go deeper (18 cards): Safe scripts, quoting, text processing, JSON, SSH, sync, sessions, scheduling, ports and bulk work.
All 12 cards in Start from zero
What is the terminal, in one plain sentence?
A window where you control the computer by typing short text lines instead of clicking icons.
Why type commands when you can click?
Typing is faster for repeat jobs, works on far-away computers that have no screen, and can be saved as a list to run again any time.
Where do you already meet the terminal idea?
Typing in a search box and pressing Enter, or asking a voice assistant to 'set a timer for 5 minutes'. You say exactly what you want and it acts.
What is an everyday picture for the terminal and the shell?
The terminal is the phone line; the shell is the helpful operator on the other end who listens to your request and makes it happen.
What do command and prompt mean?
A command is one typed instruction, like ls to list files. The prompt is the short text, often ending in $, that shows the computer is ready for your next command.
What do file, folder and path mean?
A file holds content, like a photo. A folder (also called a directory) holds files. A path is the address of a file, like /home/ravi/photos/trip.jpg, folder by folder.
What are flags and arguments?
An argument is what the command works on, like a file name. A flag is an option that changes how it works, usually starting with -, like -l for a long list.
What are a server, SSH and a script?
A server is a computer that runs apps for others, usually far away. SSH lets you log in to it and type commands there. A script is a file of commands that run one after another.
What are root and sudo?
Root is the all-powerful admin user that can change anything. sudo lets you run one command as root, so you borrow that power only when you need it.
What do you need before starting?
Nothing to install. Mac and Linux have a Terminal app built in; on Windows, open the Terminal app and pick Ubuntu (WSL) or PowerShell.
What is a first tiny win in the terminal?
pwd prints where you are, ls lists what is in that folder, and echo prints back the words you give it.
What will you be able to do after this topic?
Move around folders, find and move files, read logs, chain commands together, fix a server over SSH and write small scripts that do boring jobs for you.
Terminal and shell basics cheatsheet

Move and look

  • pwd Current folder
  • ls -lahtr All files, sizes, newest last
  • cd - Back to previous folder
  • tree -L 2 -I node_modules Folder tree, two levels
  • less +F app.log Follow a log, Ctrl+C to scroll
  • tail -n 200 -f app.log Last 200 lines, then live

Files

  • mkdir -p a/b/c Make the whole path
  • cp -a src/ dst/ Copy keeping owners and times
  • mv -n old new Rename, never overwrite
  • rm -rf "${DIR:?}/" Delete, refuse if DIR is empty
  • chmod 600 .env Owner read and write only
  • tar -czf out.tgz dir/ && tar -xzf out.tgz Pack and unpack

Search and text

  • grep -rnw --exclude-dir=node_modules term . Find a word in code
  • find . -type f -size +100M -mtime -7 Big recent files
  • sort | uniq -c | sort -rn | head Top repeated lines
  • awk '{print $1}' file First column
  • sed -i.bak 's#old#new#g' file Replace in place, with backup
  • jq -r '.[] | .id' data.json Pull fields from JSON
  • find . -print0 | xargs -0 -P 8 cmd Parallel, safe with any names

Line editing keys

  • Ctrl + R Search command history
  • Ctrl + A Start of line
  • Ctrl + E End of line
  • Ctrl + W Delete word back
  • Ctrl + U Delete to start of line
  • Ctrl + C Cancel running command
  • Ctrl + Z Pause, then fg or bg
  • Ctrl + L Clear screen

System and network

  • ps aux --sort=-%mem | head Top memory users
  • kill PID; kill -9 PID Polite stop, then force
  • df -h; du -xh --max-depth=1 | sort -h Disk free and who used it
  • journalctl -u nginx -f Follow a service's logs
  • lsof -nP -iTCP:3000 -sTCP:LISTEN Who holds a port
  • rsync -avz --partial src/ host:/dst/ Resumable sync to a server
  • tmux new -s work / tmux attach -t work Session that survives logout
Donate