IT FundamentalsA+

Linux Basics for CompTIA A+ 220-1102

CompTIA A+ 220-1102 requires basic Linux knowledge for the growing number of Linux-based enterprise and IoT deployments. A+ candidates must know Linux command-line navigation, file system structure, permissions, common commands, and desktop environments. This guide covers every Linux topic in the A+ Core 2 objectives.

12
7 sections · 8 exam key points
2 practice questions

Linux Distributions

Linux is an open-source kernel; distributions (distros) package the kernel with tools and a package manager. Major families: Debian-based: Debian, Ubuntu, Linux Mint, Raspberry Pi OS. Package manager: APT (apt-get, apt). Red Hat-based: Red Hat Enterprise Linux (RHEL), CentOS, Fedora, AlmaLinux. Package manager: RPM/YUM/DNF. Arch-based: Arch Linux, Manjaro. Package manager: pacman. Desktop environments: GNOME (Ubuntu default), KDE Plasma, XFCE, LXDE, Cinnamon (Mint). Linux server editions often have no GUI (command-line only). Android is based on the Linux kernel. Common desktop Linux distros for A+ context: Ubuntu and Linux Mint (most beginner-friendly).

Linux File System Structure

Linux uses a single hierarchical file system starting at / (root). Key directories: / (root — top of the hierarchy), /home (user home directories — like C:\Users), /etc (configuration files), /bin and /usr/bin (user commands/executables), /sbin and /usr/sbin (system administration executables — require root), /tmp (temporary files — cleared on reboot), /var (variable data: logs in /var/log, spool files), /dev (device files — hardware represented as files), /mnt and /media (mount points for external drives), /proc (virtual file system — kernel and process information), /boot (boot files, including kernel). Unlike Windows, Linux uses forward slashes (/), not backslashes (\). Case-sensitive: File.txt ≠ file.txt ≠ FILE.TXT.

Essential Linux Commands

Navigation: ls (list files), ls -la (long format with hidden files), cd (change directory), pwd (print working directory), mkdir (make directory), rm (remove file), rm -rf (remove directory recursively — use with caution), cp (copy), mv (move/rename), cat (display file), less (page through file), head (first lines), tail (last lines), tail -f (follow log in real time). File creation and editing: touch (create empty file or update timestamp), nano/vi/vim (text editors). System info: uname -a (kernel version), df -h (disk space usage), free -h (RAM usage), top or htop (process monitor — like Task Manager). Searching: find /path -name filename, grep pattern file (search text within files). Root access: sudo command (run as superuser), su (switch to root shell). man command: display manual page for any command.

Linux File Permissions

Linux permissions use a 3x3 matrix: owner, group, and others (world), each with read (r/4), write (w/2), execute (x/1). Example: `-rwxr-xr--` = file (not directory), owner can read/write/execute, group can read/execute, others can only read. Octal notation: chmod 755 file = rwxr-xr-x (7=rwx, 5=r-x, 5=r-x). chmod: change permissions. `chmod 644 file.txt` (owner rw, group r, others r). chown: change ownership. `chown user:group file`. Common permission sets: 644 = standard file (owner rw, others r), 755 = executable/directory (owner rwx, others rx), 600 = private file (owner rw only), 700 = private directory. ls -l shows permissions in the first column. The execute bit on a directory means 'enter the directory.' Root (UID 0) bypasses all permission checks.

Package Management

Package managers automate software installation, updates, and removal. Debian/Ubuntu (APT): `sudo apt update` (refresh package list), `sudo apt upgrade` (upgrade all packages), `sudo apt install packagename`, `sudo apt remove packagename`, `sudo apt autoremove` (remove unused dependencies). Red Hat/CentOS (DNF/YUM): `sudo dnf install packagename`, `sudo dnf update`, `sudo dnf remove packagename`. Package repositories: online servers hosting software packages. Sources configured in /etc/apt/sources.list (Debian) or /etc/yum.repos.d/ (Red Hat). Snap packages: universal format from Canonical, works across distros. Flatpak: another universal package format. AppImage: self-contained executable, no installation needed.

Linux Networking

Network commands: ip addr (modern replacement for ifconfig — show IP addresses), ip route (show routing table), ping (test connectivity), traceroute (trace packet path), ss (socket statistics — modern replacement for netstat), nmap (network scanner). Configuration files: /etc/hosts (local hostname resolution), /etc/resolv.conf (DNS server configuration), /etc/network/interfaces or NetworkManager (network configuration). SSH (Secure Shell): primary remote access method for Linux. `ssh user@hostname`. SSH key authentication: generate keys with `ssh-keygen`, copy public key with `ssh-copy-id user@host`. scp: secure copy over SSH. `scp file.txt user@host:/destination`. Firewall: iptables (low-level) or ufw (Uncomplicated Firewall — Ubuntu). `sudo ufw enable`, `sudo ufw allow 22/tcp` (allow SSH).

Linux System Administration Basics

User management: `sudo useradd username` (create user), `sudo passwd username` (set password), `sudo userdel username` (delete user), `sudo usermod -aG groupname username` (add user to group). Service management (systemd-based, modern Linux): `sudo systemctl start servicename`, `sudo systemctl stop servicename`, `sudo systemctl enable servicename` (start at boot), `sudo systemctl status servicename`. Log files: /var/log/syslog or /var/log/messages (system log), /var/log/auth.log (authentication log), `journalctl -f` (follow systemd journal). Cron jobs: scheduled tasks. `crontab -e` to edit user cron jobs. Format: minute hour day month weekday command. Disk management: fdisk (partition management), mkfs (make file system), mount/umount (mount/unmount drives).

Key exam facts — A+

  • Linux file system starts at / (root); /home contains user directories
  • ls -la shows all files (including hidden dotfiles) in long format
  • chmod 755 = rwxr-xr-x; chmod 644 = rw-r--r--
  • sudo runs commands as root; su switches to root shell
  • apt update refreshes package list; apt install installs packages (Debian/Ubuntu)
  • SSH is the primary Linux remote access protocol (port 22)
  • grep searches file content; find searches for files by name/attributes
  • systemctl start/stop/enable/status for service management

Common exam traps

Practice questions — Linux Basics

These questions are representative of what you will see on A+ exams. The correct answer and explanation are shown immediately below each question.

Q1.

A.A. yum update && yum install packagename
B.B. apt-get install packagename only
C.C. sudo apt update && sudo apt install packagename
D.D. sudo rpm -ivh packagename

Explanation: Ubuntu uses APT. Best practice is to run `apt update` first to refresh the package list, then `apt install` to install the package. sudo is required for both. YUM and RPM are for Red Hat-based systems.

Q2.

A.A. Owner can read and write; group and others can only read
B.B. Everyone can read, write, and execute
C.C. Owner can read, write, and execute; others have no access
D.D. Owner can read only; group and others have full access

Explanation: rw- = read and write (no execute). r-- = read only. The pattern -rw-r--r-- means the owner has read/write, group has read only, and others have read only. This is the typical 644 permission set.

Frequently asked questions — Linux Basics

What Linux commands should I know for the CompTIA A+ exam?

Focus on: ls, cd, pwd, mkdir, rm, cp, mv, chmod, chown, cat, grep, find, ping, ip addr (or ifconfig), sudo, top, df, free, ssh, and apt (or yum). The A+ exam tests conceptual knowledge of these commands and their basic usage — not advanced scripting or system administration.

Practice this topic

Test yourself on Linux Basics

JT Exams routes you to questions in your exact weak areas — automatically, after every session.

No credit card · Cancel anytime

Related certification topics