The Command-Line for Beginners
An Introvert's Guide to Crawling into Your Shell
with Eric Poe
Chapter 1: Fear
Why The Terminal Feels Scary
It looks like a black box.
Where’s the undo button?
You type something and it yells at you.
We’ve all been there
A Different Kind of Conversation
The shell isn’t judging you – It’s listening carefully
Just like programming, it does exactly what you tell it to do.
Or maybe, it does what you ask it to do
You are having a conversation with your computer, not commanding it
Don’t command, converse!
My Journey into the Shell
Started with a blinking cursor on an IBM PCjr
Enjoyed the direct control of the computer
Today, I use it to configure, debug, and deploy
You don’t need decades of experience—�You need curiosity
Chapter 2: Curiosity
Meet Your Companion: The Shell
🪟 Terminal: A window to talk to your OS
⌨ Command Line: Where you speak
🐚 Shell: A program that interprets what you say
Your First Words
You are not memorizing spells�—you are learning a language
pwd “Where am I?”
ls “What’s around me?”
cd “Let’s go somewhere”
rm “Eww, throw that away!”
Why Developers Still Love the CLI
Ex: Copy a Directory from Your Downloads folder to your Documents folder
cp -R ~/Downloads/foo ~/Documents/
The Power of Small Wins
Find a file in seconds:
See what’s running:
Know yourself:
Know your space:
Congratulations!
You now know how to ask your computer questions and get answers!
Chapter 3: Clarity
Respecting Permissions
Your system protects itself for a reason
sudo = “Please do this with authority”
chmod & chown Decide who gets to touch what
chmod = Decide read/write/execute permissions for user/group/ogres
chown = Decide to which user/group these permissions apply
Connecting to Other Computers
Insecure way: Telnet
Communication via postcard
Useful for checking if a port is open on a site
Secure way: SSH
Communication via encrypted text
Connect to the terminal on another computer!
Copying Files
Small, Local 🥱
cp source/this.txt target/this.txt
Secure, Remote 🏦
scp ~/dir/this.txt me@target.loc:~/dir/this.txt
scp me@source.loc:~/dir/this.txt ~/dir/this.txt
Syncing Files
Living in the Future 🚀
Push: rsync -aP ~/dir/this.txt -e ssh me@target.loc:~/dir/this.txt�Pull: rsync -aP -e ssh me@source.loc:~/dir/this.txt ~/dir/this.txt
Learning from the Shell: Man Pages
Your shell is not just a tool—it’s a teacher, too!
Converse with the shell to learn more about a command
man = “manual”
man printf
Alternatives to Man: Local
tldr printf
Alternatives to Man: Online
Combining commands: Pipe
Pipe command: |
Takes output, feeds it forward
Ex. To find the running instance(s) of PHP on your machine:
ps aux | grep php
Top 5 Shell Commands On My Computer
history | tr -s ' ' | cut -d ' ' -f3 | sort | uniq -c | sort -nr | head -n5
Saving Output
> = Save for Later
date > timeNow.txt
diff file1 file2 > diff.txt
>> = Append and Save for Later
php generateBugs.php >> bugs.log
Compounding Commands
Now we can write sentences with composition!
ps aux | grep php > runningPHP.txt
Automating Scripts with Bash
Now we can combine sentences into paragraphs and stories!
bash script = a todo list for your computer
Note: Script files typically end in .sh
# installApplication.sh
composer install�bin/cmd cache:clear�bin/cmd cache:warmup
Chapter 4: Mastery
Sidekicks for the Road
Self Correction
The F*ck
Command Line Fun
Nostalgia
Wonder
Learning Quietly
Julia Evans (aka b0rk) Wizard Zines
Games to Learn BASH
Copied from: gist.github.com/zacWCCI/170f4e1d1420ce80fdd31ab78d462d21
Reflection: You and Your Shell
Final Takeaways
✅ The shell listens to you
✅ You should command with clarity
✅ You should know how to find out what each command and option does
✅ Automation frees your time for the fun stuff
🐚 You now have a friend in your terminal
Extra Credit
Is this good advice?
What will it do?
Chapter 5: Confidence
This chapter is written by you
Thank You!
Eric Poe�Application Manager�Stowers Institute for Medical Research�stowers.org
Email: eric.poe@gmail.com
Mastodon: https://phpc.social/@ericpoe
Blog: ericpoe.com