Windows & Linux · Linux Basics & Fundamentals

Linux Basics & Fundamentals

Core admin skills: filesystem hierarchy, Debian/Ubuntu package management, systemd service control, processes, and essential system monitoring & logging.

Linux Filesystem Hierarchy Overview

The Filesystem Hierarchy organizes everything as files under the root /. Knowing where things live helps with troubleshooting, backups, and automation.

Package Management on Debian‑based Systems

Debian/Ubuntu use APT (Advanced Package Tool) to query, install, and update software from repositories defined in /etc/apt/sources.list (and files in /etc/apt/sources.list.d/).

Common APT commands

sudo apt update            # Refresh package lists
sudo apt upgrade           # Upgrade installed packages
sudo apt install <pkg>    # Install a package
sudo apt remove <pkg>     # Remove (keep configs)
sudo apt purge <pkg>      # Remove incl. configs
apt search <term>         # Search available software

Low‑level: dpkg

dpkg works directly with .deb files and the local package database.

sudo dpkg -i package.deb   # Install a .deb
sudo dpkg -r <name>        # Remove (keep configs)
sudo dpkg -P <name>        # Purge (remove configs)
dpkg -l                    # List installed packages

Managing System Services (systemd)

systemd is the init system & service manager on most modern distros. You interact with it using systemctl and view logs via journalctl.

systemctl status <service>             # Check status
sudo systemctl start|stop|restart <service>
sudo systemctl enable|disable <service> # Manage autostart
journalctl -u <service>                # Service logs

Process Management

Processes are running programs; each has a PID and consumes CPU/memory. Use these commands to inspect and control them.

ps aux                      # Snapshot of processes (BSD style)
top                         # Interactive live view
htop                        # Nicer top (if installed)
kill <PID>                  # Terminate by PID
pkill <name>                # Terminate by name
jobs; bg; fg                # Manage shell jobs

System Monitoring and Logging

uname -a        # Kernel and OS info
hostnamectl     # Hostname and chassis info
lscpu           # CPU details
free -h         # Memory usage

Key logs (Debian/Ubuntu): /var/log/syslog, /var/log/auth.log, and kernel ring buffer via dmesg.

Conclusion

These fundamentals—filesystem layout, packages, services, processes, and logs—form the day‑to‑day toolkit for Linux admins. Master them first, then layer on scripting, automation, and security hardening.

Back to Home