Linux & CLI Essentials: Become Comfortable in the Terminal
The command line is not a punishment for avoiding a graphical interface. It is a composable language for operating a computer.
filesystem path shell stdin stdout stderr pipe redirect process permission environment variable
The first commands
pwd
ls -lah
cd project
mkdir results
cp input.csv backup.csv
mv old.txt new.txt
rm temporary.txtThen learn inspection:
cat file.txt
less file.txt
head file.txt
tail file.txt
grep "ERROR" app.logThe superpower: composition
grep "ERROR" app.log | sort | uniq -cRead it left to right:
find error lines
↓
sort them
↓
count unique occurrences
Resources
Ubuntu — Command Line for Beginners:
https://ubuntu.com/desktop/docs/en/latest/tutorial/the-linux-command-line-for-beginners/
Linux Foundation — Introduction to Linux:
https://training.linuxfoundation.org/training/introduction-to-linux/
GNU Bash manual:
https://www.gnu.org/software/bash/manual/
The Missing Semester:
https://missing.csail.mit.edu/
Before running sudo, recursive deletion, permission changes, or commands copied blindly from the web, understand what they will modify.
Next: CLI for Data Science & ML