____ _
| _ \ _ __ ___ __ _ _ __ ___ ___ ___ | | ___ __ _
| |_) | '__/ _ \ / _` | '__/ _ \/ __/ __| | | / _ \ / _` |
| __/| | | (_) | (_| | | | __/\__ \__ \ | |__| (_) | (_| |
|_| |_| \___/ \__, |_| \___||___/___/ |_____\___/ \__, |
|___/ |___/
Tell Claude: "Let's play Bash Quest" or "Continue SLM-bash" Claude will read the game files and pick up where you left off!
Started as a bash learning session, evolved into building a full game project. Lukas suggested the Socratic method, then expanded scope to include:
- Spaced repetition & active recall
- A leveling system
- Building a deployable web app
- Eventually giving this to his son
-
The Prompt (
username@hostname:~$)~= home directory$= regular user (vs#for root)- Visual indicator of privilege level
-
ls- list directory contentsls -l= long format (detailed info)ls -a= all files (including hidden)ls -laandls -l -aare equivalent (flags can be combined)
-
cd- change directory- Relative path:
cd projects(from current location) - Absolute path:
cd /home/lukas/work/projects(full path from root)
- Relative path:
-
man- manual pages- Already knew this! Use
man <command>to learn about any command
- Already knew this! Use
-
mkdir- make directorymkdir -pfor nested/parent directories
-
touch- create empty file / update timestamp- Originally for updating timestamps, creating files is a side effect
-
File viewing
cat= concatenate, dumps whole fileless= pager, scroll up/down, search with/, quit withqmore= older pager, forward-only ("less is more" joke)head -n 20= first 20 linestail -n 20= last 20 linestail -f= follow file in real-time (for logs)
-
Redirection
>= overwrite file>>= append to fileecho "text" > file.txtexample
User instinctively reaches for man to learn - this is the right approach.
Asks good "why" questions (why is it -n? does more still exist?)
- Moving/copying/removing (
mv,cp,rm) - Pipes (
|) - chaining commands - grep and finding things
- Permissions basics
- Environment variables
- Learning style: practical, asks good clarifying questions
- Prefers understanding why commands are named what they are