Ninja-level Linux
Advanced pipelines, process substitution, debugging scripts, top and lsof…
Advanced pipelines, process substitution, debugging scripts, top and lsof, Vim macros, registers and splits, then Neovim, and troubleshooting a website that is down. It ends with a few “something broke” scenarios.
Level 4 of 4: 17 lessons, about 2 h 46 min
After it, you can fix things nobody explained to you.
You should know how to write a shell script with if, loops and functions, use awk and xargs, manage services, users and cron, edit quickly in Vim, and find your way around ports and DNS. Advanced covers it.
0 of 17 done
The Ninja lessons
Pipelines and scripts
- Lesson 50: Pipelines that answer real questions:
awk,teeand pipefail9 minawksort -nrteeset -o - Lesson 51: Process substitution: compare commands with
<( )9 min<( )diffwhile readsort - Lesson 52: Debugging shell scripts:
bash -x, set -euo pipefail andtrap10 minbash -xset -xset -eset -u - Lesson 53: Slow machine, busy port:
top, ps and lsof8 mintopps auxlsof -ikill
Vim and Neovim
- Lesson 54: Vim macros: record an edit once, play it a hundred times8 min
vimqa@a - Lesson 55: Vim registers and marks: copy many things, jump back8 min
"a"0:regma - Lesson 56: Vim splits and buffers: two files side by side8 min
:vsplit:wincmd:ls:wqa - Lesson 57: Neovim: the same keys, a config in Lua9 min
nviminit.luavim.optvim.keymap.set
Troubleshooting
- Lesson 58: The website is down: find out why, one layer at a time9 min
curl -Inc -zsystemctl statusjournalctl -u - Lesson 59: It’s always DNS:
dig,/etc/hostsand resolv.conf9 mindigdig @server/etc/hosts/etc/resolv.conf - Lesson 60: Refused or timed out? Find the firewall rule9 min
nc -zcurl -mufw statusufw allow - Lesson 61: Read a packet capture with tcpdump10 min
tcpdump -rtcpdump -ntcpdump -A - Lesson 62: SSH tunnels: reach what only the server can see9 min
ssh -Lssh -Nssh -fss -tlnp
Something broke
- Lesson 63: Something broke: the shop’s API answers 50012 min
df -hdu -hsort -hlsof +L1 - Lesson 64: Something broke: the web server won’t start12 min
systemctl statusjournalctl -unginx -tvim - Lesson 65: Something broke: “command not found”, and the fan won’t stop12 min
PATHexportsourcekill -9 - Lesson 66: Final challenge: the shop is broken in three places15 min
pingdigufw statussystemctl status
All levels
The course has four levels, each building on the one before. See the whole course.
- Beginner16 lessons, about 1 h 42 minFind your way around and manage files.0 of 16 done
- Intermediate16 lessons, about 1 h 50 minWork comfortably day to day.You should know how to move around, manage files and folders, read permissions, and use pipes, grep and find. The Beginner lessons cover each of these.0 of 16 done
- Advanced17 lessons, about 2 h 37 minAutomate things and run a server.You should know less, tar, sed, variables, aliases and processes, how to open, edit and save a file in Vim, and how to ssh into another machine.0 of 17 done
- NinjaYou are here17 lessons, about 2 h 46 minFix things nobody explained to you.You should know how to write a shell script with if, loops and functions, use awk and xargs, manage services, users and cron, edit quickly in Vim, and find your way around ports and DNS.0 of 17 done