boot folder has different images for the kernel and OS. When you update Linux kernel, it updates grub/efi pointers what’s going to be used. You keep previous kernel version for recovery and rollbacks.
look up what dev folder does. Looks up our files. like the urandom file prints random gibberish. why would it do this? has to do with crypto. Used for salt hashes, etc.
Everything is a FILE in Linux
etc folder tends to hold configuration files. Like hosts for DNS, your sources list for apt, etc. Your password file, which doesn’t hold the passwords, btw. Now, they’re in /etc/shadow.
home directory is for all of the users
lib directory is the library. 32 and 64 bit.
media directory. this is where usbs mount, etc. or mount to usb or cdrom. According to John Strand, he hates this. Everything should go to mount directory (mnt)
the opt directory is for self contained programs. binary, libs, etc are all here. For example, JohntheRipper should go here
proc folder is process Ids. Is a higher number newer? The answer is no. they get reused. you can go into those processes
root folder is home directory for the root user. The all powerful account
run folder exists. where they put exe
snap folder is package manager for debian/ubuntu. if it exists
var directory holds a LOT of logs lol
sbin directory are system/service binaries. These manage the system.
usr directory is for user programs. No need for root (generally)
How do we know where a program is? use which followed by linux command. How does it find it? It used $PATH, which is the search order where it looks for the program
Users and privileges
$ means you’re not root, while # means you are root
General commands
mkdir for making directories
use locate to find files.
updatedb indexes database. Meaning if create a file called rocky2 and use locate rocky2 BEFORE using sudo updatedb, it won’t be found. Afterwards, it will show up.
take screenshot and put in blog
vi editing basics. use screenshot John said to take and put in here!
recommend learning vi. the colon : means you’re telling vi to do something!
talk about how I’m a nano guy but mention you’d like to learn vi. Especially because it’s always available. nano might not be lol
ps aux lets you see processes.sorted by user
top shows you exactly what is running and taking most CPU at that moment in time
btop is also an option
ip a shows you your current IP. ifconfig is the classic.
ping allows you to see if a system is alive.
nmap lets you see open ports. mention there will be a closer look at nmap later
He mentions ping, port, parse. Ping to see if alive, port we’re trying to communicate with open, and parse the errors or anything you get back
netstat sees network connections. Available for windows as well. he is not a fan.