Linux Class
Here is a list of ideas for a linux class.
Class 1
Linux basics
- history, ctrl+r, pressing up in the terminal brings up the previous command.
- You can use tab to auto-complete anything, filenames, commands, etc.
- pwd, ls, cd, mkdir, rm, rm -rd, mv, cp
- man
will show you the manual for the program, Google is also your friend. - .. is a short command for "up one dir"
- . is a short command for "current directory"
- ~ is short for home directory. e.g. /home/cwiggs, or /root
- almost all commands have switches, or parameters. -r for recursive, -f for force. Not always consistent across programs though.
Homework / Testing
- Change into the "~/Downloads" directory.
- List the contents of "~/Downloads" directory.
- Create a directory called "test_dir1".
- Copy "test_dir1" to "test_dir2".
- Delete the "test_dir1" directory.
- Rename "test_dir2" to "test_dir3".
- With 1 command make this directory: "~/Downloads/one/two/three".
- With 1 command delete this directory: "~/Downloads/one/two/tree".
- Questions, what do you want to learn next.
Brain dump for future classes
Class 2
- tail, vim, head, cat
- grep
future classes
- stderr/stdout/stdin
*, &&, !!, ;- exit codes, 0 for success, 1 for failure, etc
- piping commands, tail -f /var/log/syslog | grep ERROR
- std redirection
- package managers: apt-get, yum, etc
- ps, top, lsof?
- disk, filesystems: df, du, fdisk, dd, mkfs
- permissions, no 777
- sed:
sed 's/this/that/g' - explain dns basics: dig, nslookup, ttl
- explain IPs, ports: nmap, nc, netstat, tcpdump, ipcalc.
- explain env vars: $PATH, $PS1?
- find: `find / -iname "sumologic"
- vim class:
ZZ, :q, :w, :w!, %s/search/replace/g, /search, GG, gg, caw, daw - GCP/cloud class: spin up GCP compute always free tier VM using terraform