Linux distributions maintain software repositories. Package managers find software, resolve dependencies, install it, and upgrade it. Tools vary by distribution, so check cat /etc/os-release before copying an online command.
apt and dnf
Debian and Ubuntu families commonly use apt. sudo apt update refreshes the local repository index; it does not upgrade everything. Use sudo apt install curl, sudo apt upgrade, and sudo apt remove curl to install, upgrade, and remove.
Fedora, Rocky Linux, and RHEL families commonly use dnf: dnf search nginx, dnf check-update, sudo dnf install curl, sudo dnf upgrade, and sudo dnf remove curl. Production upgrades should respect change control, backups, and maintenance windows.
Debian / Ubuntu · apt
sudo apt update sudo apt install curl sudo apt remove curl
Fedora / Rocky / RHEL · dnf
dnf check-update sudo dnf install curl sudo dnf remove curl
Confirm system identity
uname -r shows the kernel release, uname -a more complete kernel/system data, and uname -m an architecture such as x86_64 or aarch64. Distribution and kernel versions are different concepts. hostname confirms the current machine; check it before changes or restarts when managing several servers.
Uptime, memory, and disk
uptime shows running time and load averages; load is not simply a CPU percentage. free -h shows memory. Linux uses otherwise idle memory as cache, so available is often more informative than free.
df -h answers how much filesystem space remains; du -sh /var/log answers how much a directory uses. lscpu shows CPU architecture, cores, and threads. Confirm architecture before downloading binaries or images.
whoamiWho am I?
hostnameWhich machine?
cat /etc/os-releaseWhich distribution?
uname -rWhich kernel?
free -hHow is memory?
df -hHow is disk?
Unfamiliar-server rule: identify user, hostname, distribution, and state before changing anything.
Unfamiliar Server Check-in
Waiting for the first read-only inspection command.
KNOWLEDGE QUIZ
KNOWLEDGE QUIZ
Produce a Server Handover Report
After logging into a lab server, write identity, system, resources, and package-tool evidence to server-report.txt without modifying the system.
- Record the current user and hostname.
- Append distribution, kernel, and architecture.
- Append uptime, memory, and filesystem space.
- Use /etc/os-release to choose apt or dnf; write, but do not run, the curl install command.