Linux Terminal

Servers don’t have buttons. They have vibes and a terminal.

▶ the lesson · narrated sketch video · tap for sound

the intro

Every server you will ever deploy to is a Linux box you reach through a terminal. A dozen commands — cd, ls, cat, grep, less, systemctl — cover daily server life. Learn them once and every cloud instance becomes familiar instead of scary.

fun fact ✦

Linux Torvalds named it after himself — and the penguin, Tux, came later.

the docs

the deep dive

the ideas behind the video — concepts, diagrams, a walkthrough and the traps to avoid

A terminal is a programming language where the functions are programs and the glue is pipes. Each tool does one small job — cat prints, grep filters, tail follows — and the pipe operator chains them into exactly the tool you needed, which nobody had to write. That is how one keyboard drives a datacenter.

small tools, glued with pipes

your laptopsshremote boxbash shell
one encrypted line to a machine with no screen

key terms

shell

The program that reads your lines and runs them. bash and zsh are the common ones.

echo $SHELL

pipe

Sends the output of one command straight into the input of the next. Chains become bespoke tools.

cat log | grep ERROR

PATH

The list of folders the shell searches when you type a command. Install a CLI and this is how it gets found.

echo $PATH

permissions

Read, write, execute flags per user, group, and other. chmod changes them.

chmod +x deploy.sh

how it works

  1. 1
    SSH in

    ssh user@host connects you; the prompt changing means your keys now type on another machine entirely.

  2. 2
    Orient yourself

    pwd prints where you are, ls -la lists everything including hidden files, cd moves. Muscle memory here pays forever.

  3. 3
    Park long jobs in tmux

    A dropped Wi-Fi connection kills your ssh session — but not a tmux session. Reconnect and tmux attach like nothing happened.

  4. 4
    Let the logs talk

    journalctl -u myapp reads a service log, tail -f streams a file live. Servers explain themselves if you know where to listen.

  5. 5
    Restart the service

    sudo systemctl restart myapp is the power switch, and status confirms it came back up. Ninety percent of ops is this loop.

the code, explained

a routine server checkup

2$ systemctl status nginx
is the service alive? ask this first
3$ tail -f /var/log/nginx/error.log
live log stream, Ctrl+C to stop
4$ journalctl -u myapp | grep -i error
case-insensitive filter over the journal
5$ sudo systemctl restart myapp
6$ exit
the session ends, the server keeps running

side by side

point and click

  • nice for local apps
  • needs a desktop on the box
  • hard to automate or repeat
  • impossible over plain ssh
VS

terminal

  • works over any ssh line
  • every step is scriptable
  • identical on every distro
  • runs where no screen exists
⚠️ watch out

The terminal assumes you meant everything you typed. There is no recycle bin, no confirmation dialog, no undo — sudo rm -rf with one wrong character is a resume-generating event. Read the path twice, hit Enter once.

quick answers

Which distro should I learn on?

The cloud runs Ubuntu and Debian mostly, and the core commands are identical everywhere. Learn the shell, not the distro.

How do I escape vim?

It opened because git or crontab picked it as the editor. :q! quits without saving, :wq saves and quits. That is the whole emergency procedure.

How do I find out what a flag does?

man command shows the full manual on the machine itself, works offline, and q exits. It travels with every server you will ever ssh into.

quick hits about Linux Terminal

short answers · interviews, tips, trivia & hidden gems

📚 tutorial

The 12 commands that run serverswatch ↗

🔧 useful

Pipes: command into commandwatch ↗

💎 deep

The manual is built inwatch ↗

💎 deep

Make any script a real commandwatch ↗

🧠 trivia

Everything is a filewatch ↗

🧠 trivia

Servers have no buttonswatch ↗