Skip to main content

Linux

An operating system. The grandfather of the Big Three. An open-source, Unix-like OS. Anyone is free to use it and create their own versions with edits to it.

Since the Linux OS is open-source, there are a lot of different versions (known as Linux distributions; distro for short) out there, but they're all based on the original Linux kernel. Linux is known to be the backbone of many enterprise networks due to it's multifaceted capabilities. Linux can serve as a desktop, server, development, or networking OS.

Features

  • lots of features for Windows-Linux interop (e.g. Samba)
  • virtualization via Hypervisor

Mainstream Distros

  • Ubuntu
  • Red Hat
  • Mint
  • Debian GNU/Linux
  • Proxmox (used for servers)
  • Arch (pain)
  • Kali Linux
  • Suicide Linux (a joke; a terrible joke at that)

Common Terminal Commands

  • ls (file & directory)
  • mv (file & directory)
  • cp (file & directory)
  • ps (process management)
  • top (process management)

Storage Optimization Process

Check for errors within a specific filesystem using the Linux Terminal. Process:

  • df -Th - List the mounted filesystems, including their types, in human-readable form.
  • sudo unmount /dev/[example fs] - Unmount the selected filesystem before checking it for errors.
  • sudo fsck /dev/[example fs] - Run the Linux error-checking utility for storage devices. If there's an error, it'll warn the end user/administrator and also try to fix said errors.

Installing Packages

  • .deb/.dpkg for Debian, Ubuntu, and others w/ APT
  • .rpm for Red Hat Linux and other Fedora distributions w/ YUM

Can be installed using the App Center that some distributions have. Can be installed using the provided app manager that distros have. e.g. apt, dsc, pacman, yum and more.

When installing Linux packages, the system computes a hash value of the contents downloaded and compares it with the official hash value provided by the program author. If they are the same, then the file is safe, but if they aren't it means the file's integrity has been compromised and it's likely that it has been infected with some form of malware.

Viewing Processes using ps

ps current processes running in the current shell session ps -e simple list all processes running on the system (won't have a TTY since they were loaded on boot) ps -ef extended formatted information ps -elf extended detailed formatted information ps aux all running processes and includes the owner

Field Description
PID Process ID
TTY Tied Shell Session Name
TIME Amount of CPU time used by the process
CMD Command used to spawn the process
UID User ID that owns this process
PPID PID of the parent process (only if this is a subprocess)
C Amount of CPU utilization
STIME Start time of the process
F Process flags
S Current state of the porcess
PRI Priority of the process
NI Nice value of the process
SZ Size of the process in RAM used

#IV