Welcome, Alice — a basic Linux tutorial

This is CT 2554, your own virtual server — a Linux container running on the Charliehub infrastructure (loft servers in 9DBC). You have full sudo access inside it and you're free to experiment. It's deliberately sandboxed: nothing you do in here can reach the production control plane, so don't be afraid to break things. If something goes badly wrong, we can rebuild it.

1. Where am I?

The shell always has a "current directory". These three commands answer the basic questions where am I, what's here, how do I move?

pwd        # print working directory
ls         # list files in the current directory
ls -la     # list everything, including hidden files, with details
cd ~       # go to your home directory (just "cd" works too)
cd ..      # go up one level

2. Looking at files

cat file.txt        # dump a whole file to the terminal
less file.txt       # scroll through it (q to quit)
head -n 20 file.txt # first 20 lines
tail -f log.txt     # follow a log as it grows (Ctrl+C to stop)
nano file.txt       # edit a file (Ctrl+O save, Ctrl+X quit)

3. Making and moving things

mkdir myproject         # make a directory
touch notes.md          # create an empty file
cp a.txt b.txt          # copy
mv old.txt new.txt      # rename / move
rm file.txt             # delete (no undo!)
rm -r somedir           # delete a directory and its contents
Careful: there is no recycle bin. rm means gone. Inside this CT that's fine — it's meant to be broken and rebuilt — but build the habit of pausing before rm -r.

4. Finding things

grep -r "TODO" .        # search file contents recursively
rg "TODO"               # ripgrep — same idea, much faster
find . -name "*.py"     # find files by name pattern

5. Your workspace

You're in ~/projects. Everything you build goes here.

There's also ~/.env in your home folder containing API keys. Standard hygiene: don't commit it, don't paste it anywhere, don't print it in full.

6. What's preinstalled

Python 3.12, Node 22, gcc, git, jq, ripgrep, vim, nano, and the usual suspects. On the Python side you already have fastapi, httpx, sqlalchemy, psycopg2, pydantic, rich, and python-dotenv system-wide — enough to build a FastAPI + Postgres app with zero installs.

PostgreSQL 16 is running locally on 127.0.0.1:5432. You have a login role alice and a database alice with CREATEDB, so just typing psql connects you.

For anything beyond what's preinstalled, use a per-project venv — Ubuntu 24.04 enforces PEP 668, so don't pip install system-wide:

python3 -m venv .venv
source .venv/bin/activate
pip install <whatever>

7. Survival tips

Have fun. 💛
— Papa