Intermediate Linux system administration aligned to LPIC-1 (Exams 101 & 102). Disk management, networking, and process control hands-on labs.
Disk partitioning & filesystems, network configuration, and process management — core LPIC-1 exam topics.
/dev/sdb) to the file server. You must partition the disk, create an ext4 filesystem, mount it to /mnt/data, configure persistent mounting via /etc/fstab, and verify everything works after a simulated reboot. This is a fundamental sysadmin task tested on LPIC-1.lsblk lists information about all block devices (disks, partitions, loop devices). It shows device names, sizes, types, and mount points in a tree format. This is the first command to run when managing storage.sda is your primary disk (OS), sdb is the new disklsblk is safer than fdisk -l for a quick overview — it doesn't require root privileges and never modifies anything.fdisk /dev/sdb opens an interactive menu where you press n (new), p (primary), accept defaults, then w (write). In this lab, the process is simulated with a single command. After partitioning, partprobe tells the kernel to re-read the partition table.n → new, p → primary, 1 → partition number, Enter → default start/end, w → write and exit.partprobe is essential after fdisk — without it, the kernel doesn't see the new partition until reboot. Know this for LPIC-1!mkfs.ext4 creates the filesystem structure on a raw partition.blkid shows the UUID, which is more reliable than device names for fstab. Device names can change between boots!df -h shows all mounted filesystems with human-readable sizes.-p in mkdir -p creates parent directories as needed and doesn't error if the directory already exists. Always use it!/etc/fstab) tells Linux what to mount at boot. Each line specifies: device, mount point, filesystem type, options, dump, pass. A mistake here can prevent booting — always back up first!sudo cp /etc/fstab /etc/fstab.bak before editing. On the exam, backup first!device mountpoint fstype options dump pass. Pass=0 means no fsck, pass=1 for root, pass=2 for others.mount -a (validates fstab syntax)eth0. You need to assign a static IP address (192.168.1.100/24), set the default gateway (192.168.1.1), configure DNS resolution (8.8.8.8), test connectivity to the gateway and external hosts, and verify the full network stack is operational.ip command is the modern replacement for ifconfig. ip addr show displays all interfaces with their IP addresses, MAC addresses, and state. ip link show focuses on link-layer info (up/down status, MTU).lo = loopback (always present, 127.0.0.1)eth0 = primary Ethernet interface — should show NO IP address yetip addr show replaces the deprecated ifconfig. On LPIC-1 and modern distros, always use ip commands!/24 means a 255.255.255.0 subnet mask — the first 24 bits are the network portion. This gives you 254 usable host addresses (192.168.1.1 through 192.168.1.254).ip addr add adds an IP without removing existing ones. Use ip addr del to remove. These changes are temporary — they don't survive reboot.ip addr add (runtime only) vs editing /etc/network/interfaces or Netplan (persistent). LPIC-1 tests both!nameserver 8.8.8.8 uses Google's public DNS. You can list multiple nameservers for redundancy.sh -c '...' is needed because the > redirect needs root privileges. sudo echo ... > file won't work because the redirect runs as your user!/etc/resolv.conf may be managed by systemd-resolved or NetworkManager. On LPIC-1, you're expected to know the manual method.-c 4 limits ping to 4 packets (otherwise it runs forever). On the exam, always use -c to avoid hanging!nice and renice, send signals to misbehaving processes, and monitor system resources. This is essential troubleshooting covered in LPIC-1.a = show processes from all users, u = user-friendly format (shows USER, %CPU, %MEM), x = include processes without a controlling terminal (daemons). Together, ps aux gives a complete process snapshot.top -bn1 means: b = batch mode (non-interactive), n1 = 1 iteration. This is how you use top in scripts!ps aux | grep sshd searches ps output for "sshd" (shows full line but may include the grep process itself). pgrep -a nginx directly searches the process table and shows PID + command — cleaner and more reliable.ps aux | grep sshd will also show the grep command itself. To exclude it: ps aux | grep [s]shd (bracket trick).nice -n 10 starts a process with lower priority. renice changes priority of a running process. Only root can set negative nice values (higher priority).& at the end puts the process in the background. You'll see [1] PID printed — note the PID for later steps!free -h shows RAM and swap usage. uptime shows how long the system has been running and load averages. vmstat provides CPU, memory, I/O, and system activity in one view.uptime shows 1/5/15 min averages. If load > number of CPUs, the system is overloaded. On a 4-core machine, load of 4.0 = 100% utilization.jobs lists background jobs. bg resumes a stopped job in background. fg brings a background job to foreground. Ctrl+Z suspends (stops) the current foreground process.