Started Study on June 8, 2026
←
Section 3: System Access and Filesystems
Linux Root Directories
- / - The root directory
- /boot - Boot loader files, contains grub.cfg
- /dev - System device files
- /bin - Everyday user commands
- /sbin - System/filesystem commands
- /etc - System configuration files
- /home - User home directories
- /lib - Essential shared libraries and kernel modules
- /media - Mount points for removable media
- /mnt - Temporarily mounted filesystems
- /opt - Optional application software packages
- /proc - Virtual filesystem providing process and system information
- /root - Home directory for the root user
- /run - Runtime data for running processes
- /srv - Service data
-
/sys - Virtual filesystem providing an interface to kernel data structures
- /tmp - Temporary files
- /usr - User binaries, libraries, and documentation
- /var - Variable data such as logs and spool files
Important Filesystem Commands
- cd - Change directory
- ls - List directory contents
- pwd - Print working directory
File Management
- touch - Create an empty file
- cp - Copy files and directories
- mv - Move or rename files and directories
- vi - Edit files
- mkdir - Create a directory
- rmdir - Remove an directory
- chgrp - Change group ownership
- chmod - Change file permissions
Find Files and Diectories
File Types
- - - Regular file
- d - Directory
- l - Symbolic link
- c - Special file or device file
- s - Socket file
- p - Named pipe (FIFO)
- b - Block device file
Soft and Hard Links
-
inode: A number that uniquely identifies a file or directory in the
filesystem
-
Soft link (symbolic link): A file that points to another file or directory
by its path
- Hard link: A directory entry that points to an inode
Section 4:
Filters / Text Procesors Commands
- cut - Extract columns from a file
-
awk - Designed for data extraction, mostly used to extract fields from
output
- cat seinfeld-characters | awk '{$2="Osborne" ; print $0}'
- awk 'length($0) > 15' seinfeld-characters
- ls -l | awk '{if($9 == "seinfeld") print $0;}'
- ls -l | awk '{print NF}'
- grep - Search for keyword in files/output
- grep Seinfeld seinfeld-characters
- grep -c Seinfeld seinfeld-characters (count entries)
- grep -n Seinfeld seinfeld-characters (show line numbers)
- grep -i Seinfeld seinfeld-characters (ignore case)
- grep -v Seinfeld seinfeld-characters (show those without a match)
- grep -v Seinfeld seinfeld-characters | awk '{print $1}' | cut -c1-3
- egrep - Search for multiple keywords
- egrep -i "Seinfeld|Kramer" seinfeld-characters
- sort - Sort lines of text files
- uniq - Report or filter out duplicate lines
- wc - Word count