Table of Contents
- Linux Version
- Files & Directories Permission
- SUID & SGID
- Services & Processes
- Network Configuration
- Linux Password
Linux is a versatile operating system available in numerous distributions ("distros") that are customized for different uses. Unlike proprietary alternatives, Linux manages computer hardware resources while allowing various software applications to communicate with the underlying components.
Components
Linux consists of various interrelated components that together create a functional operating system environment.
Component Description BootloaderCode that initiates the operating system startup, such GRUB. OS KernelCore component managing hardware resources and I/O operations DaemonsBackground services ensuring key functions like scheduling and printing work properly OS ShellCommand-line interface ( CLI) between user and system (common shells: Bash, Zsh, Fish)Graphics server"X"or"X-server"subsystem that enables graphical applications to runWindow ManagerGraphical interface ( GUI) like GNOME or KDE providing desktop environment with file browsersUtilitiesPrograms performing specific functions for users or other applications
Linux Architecture
The Linux operating system can be broken down into layers:
Layer Description HardwarePhysical components (RAM, CPU, storage devices) KernelCore system that virtualizes and controls hardware resources, preventing conflicts between processes ShellCommand-line interface (CLI) for executing kernel functions via user commands System UtilityPrograms that perform specific maintenance or configuration tasks
File System Hierarchy
The Linux operating system follows a
tree-like structuredocumented in the Filesystem Hierarchy Standard (FHS), organizing system resources into standardized top-level directories that create a consistent arrangement across distributions.graph TD root["/"] --> bin["/bin"] root --> boot["/boot"] root --> dev["/dev"] root --> etc["/etc"] root --> home["/home"] root --> lib["/lib"] root --> media["/media"] root --> mnt["/mnt"] root --> opt["/opt"] root --> proc["/proc"] root --> root_dir["/root"] root --> run["/run"] root --> sbin["/sbin"] root --> sys["/sys"] root --> tmp["/tmp"] root --> usr["/usr"] root --> var["/var"]
Path Description /Root filesystem containing files needed to boot the OS /binEssential command binaries /bootBootloader, kernel, and boot files /devDevice files for hardware access /etcSystem and application configuration files /homeUser home directories /libShared libraries needed for system boot /mediaMount point for removable media /mntTemporary mount point for filesystems /optOptional third-party applications /rootHome directory for the root user /sbinSystem administration binaries /tmpTemporary files (cleared on boot) /usrUser programs, libraries and documentation /varVariable data (logs, emails, web files)
Linux Version
# Get linux version - works on most distributions
cat /etc/*-release
# Get linux version - kernel version only
uname -r
# Get linux version - full kernel information
uname -a
# Get linux version - detailed hardware and OS info
hostnamectlFiles & Directories Permission
SUID & SGID
Special permission bits that temporarily elevate privileges. SUID allows users to run programs with the file owner’s permissions, while SGID runs with the file’s group permissions. These enable administrators to grant limited elevated access for specific applications without giving users permanent higher privileges.
# Find SUID files
find / -perm -4000 -type f -exec ls -l {} \; 2>/dev/null
# OR using symbolic notation
find / -perm -u=s -type f -exec ls -l {} \; 2>/dev/null
# Find SGID files
find / -perm -2000 -type f -exec ls -l {} \; 2>/dev/null
# OR using symbolic notation
find / -perm -g=s -type f -exec ls -l {} \; 2>/dev/null