Listen to this story
Seasoned DevOps engineer — Jack of all trades master of None
When you start working with Linux, it's good to have a rough view with regard to Linux philosophy.
Disclaimer: This is my own highly opinionated view.
1) Everything is a file design
# check how shell was started, using the PID of the current process, and leveraging everything is a file design
ls -l /proc/$$/cmdline
# check the file descriptors of it
ls -l /proc/$$/fd
2) Each command does one thing and one thing very well.
find <location> -name <file_name> -type <file_type>
# Calculate size of each of the system top-level dirs
du --max-depth=1 -hx /
3) Everything running is a process
# check which process has PID 1
ps -p 1
# list all files opened by a process
lsof -p 1
# check file descriptors
ls -l /proc/1/fd
4) Pipelines allow composition
# find PID of python process and kill it
ps aux | grep python | grep -v grep | awk '{print $2}' | xargs kill
5) Shell comes in multiple flavors
We have sh (Bourne shell), csh (C shell), bash (Bourne-again shell), ksh (Korn shell), and last but not least zsh.