LPIC-1 Exam 101-500 Study Guide: Grok 3 (xAI) May 23, 2025
LPIC-1 Exam 101-500 Study Guide: Grok 3 (xAI) May 23, 2025
Grok 3 (xAI)
Introduction
This guide is tailored for the LPIC-1 Exam 101-500, covering System Architecture (weight:
8), Linux Installation and Package Management (weight: 12), GNU and Unix Commands
(weight: 25), and Devices, Linux Filesystems, Filesystem Hierarchy Standard (weight:
14). Sections are ordered by exam weight (highest to lowest) to prioritize study time.
Each section includes key concepts, what to expect, tips, must-know commands, and
other relevant commands from the provided list. Aim to master the 80 must-know
commands and understand key concepts. Practice in a terminal and review before bed
and tomorrow morning (6–8 AM).
What to Expect
• Question Types: Command syntax (e.g., “Which command lists files in long
format?”), output prediction (e.g., “What does ls -la | grep test show?”), or
fill-in-the-blank (e.g., “Complete: sed ’s/old/.../g’”).
1
• Focus: Combining commands with pipes/redirects, regular expressions with grep,
file operations, process control.
Tips
• Prioritize: Spend 2–3 hours on this topic due to its high weight.
• Practice: Use a terminal to try pipes (e.g., cat file | grep pattern) and redi-
rects (e.g., ls > file.txt).
• Memorize: Learn grep flags (-i, -v) and vi commands.
• Test Strategy: Read options carefully for subtle differences (e.g., ls -l vs. ls
-la).
2
Must-Know Commands
Command Description
pwd Shows current directory
env Lists environment variables
export VARIABLE Exports variable to child processes
history Shows command history
ls -l Lists files in long format
ls -la Lists all files, including hidden, in long format
ls -lh Lists files with human-readable sizes
cd /path Changes to specified directory
cd .. Moves up one directory
cd ˜ Changes to home directory
cp <file> /tmp Copies file to /tmp
mv <file> /tmp Moves file to /tmp
rm -rf <directory> Deletes directory and contents recursively
mkdir -p Creates directory with parents
test/subtest
find -name Searches for a file
<filename>
touch file Creates or updates file timestamp
cat file1 file2 > Concatenates files into file3
file3
less file1 Views file page by page
head -n 20 <file> Shows first 20 lines of file
tail -n 20 <file> Shows last 20 lines of file
grep -i "pattern" Searches file case-insensitively
file
sed ’s/old/new/g’ Replaces text in file
file
sort file Sorts lines in file
uniq -c file Counts unique lines
tr ’a-z’ ’A-Z’ Converts lowercase to uppercase
ps -ef Lists all processes
top Shows dynamic process overview
kill -9 <pid> Forcefully terminates process
nice -n 5 command Sets process priority
ls -la | tee Saves and displays output
list4.txt
Other Commands
• set: Shows shell variables and functions.
• echo $HISTFILE: Shows history file location.
• tail -f <file>: Displays file updates in real time.
• wc -l <file>: Counts lines in file.
3
• wc -w <file>: Counts words in file.
• cut -d ’,’ -f 1,2 table.csv: Extracts columns from CSV.
• pstree -p: Shows processes with PIDs in tree view.
• jobs: Lists background jobs.
• vi, :q, :wq, :w, ZZ, :x: VI editor commands for editing, saving, and quitting.
What to Expect
• Question Types: Identify FHS directories, choose correct chmod values (e.g., 755),
or complete mount commands.
• Focus: Permission octal values, mounting syntax, filesystem types (ext4, swap).
Tips
• Prioritize: Spend 1–2 hours on this topic.
• Memorize: Permission values (755 = rwxr-xr-x, 644 = rw-r–r–) and FHS directo-
ries.
• Practice: Simulate mounting a filesystem in a VM (mount -t ext4 /dev/sdb1
/mnt).
• Test Strategy: Double-check chmod and chown syntax in answers.
4
Must-Know Commands
Command Description
fdisk -l Lists all partitions
mkfs.ext4 Creates ext4 filesystem
/dev/sdb1
lsblk -f Shows filesystems and mount points
mount -t ext4 Mounts ext4 filesystem
/dev/sdb1 /mnt
umount /dev/sdb1 Unmounts filesystem
fsck /dev/sdc1 Checks filesystem integrity
du -hs /home Shows disk usage of /home
df -i Shows inode usage
chmod 755 file Sets permissions to rwxr-xr-x
chown user:group Changes file owner and group
file
ln -s file link Creates symbolic link
find / -name *.log Searches for log files
swapon -s Shows swap partitions
mkswap /dev/sdb1 Creates swap partition
swapon /dev/sdb1 Enables swap partition
pvs Lists LVM physical volumes
vgs Lists LVM volume groups
lvs Lists LVM logical volumes
Other Commands
• blkid: Shows UUIDs and filesystem types.
• locate <file>: Finds files using indexed database.
• mkfs.ext3 /dev/sdc1: Creates ext3 filesystem.
• tune2fs -l /dev/sda1: Shows filesystem properties.
• chmod 644 file: Sets permissions to rw-r–r–.
• chown -R user:group dir: Changes ownership recursively.
5
What to Expect
• Question Types: Choose correct apt command, identify GRUB config file, or list
package dependencies.
• Focus: Debian package management (apt, dpkg), GRUB commands.
Tips
• Prioritize: Spend 1–1.5 hours on this topic.
• Memorize: apt vs. dpkg, and GRUB config paths (/etc/default/grub).
• Practice: Run apt update; apt upgrade in a VM.
• Test Strategy: Watch for dpkg -r (remove) vs. dpkg -P (purge).
Must-Know Commands
Command Description
lsblk Lists block devices
df Shows disk usage and mount points
blkid Shows UUIDs of partitions
grub-install Installs GRUB bootloader
<partition>
grub-mkconfig Generates GRUB configuration
update-grub Updates GRUB config (Debian)
apt update Updates package sources
apt upgrade Upgrades installed packages
apt full-upgrade Upgrades and removes files if needed
apt autoremove Removes unneeded dependencies
apt-cache search Searches for packages
<program>
dpkg -i Installs .deb package
<program.deb>
dpkg -r <program> Removes package (keeps config)
dpkg -P <program> Purges package (removes config)
ldd /path/program Shows libraries used by program
Other Commands
• apt-cache depends <program>: Shows package dependencies.
• ldconfig: Updates system library cache.
• rpm -i <program.rpm>: Installs RPM package.
• yum update: Updates Red Hat system.
• yum install <program>: Installs package with dependencies.
6
4 System Architecture (Topic 101, Weight: 8)
Key Concepts (Must-Know)
• Hardware Info: List hardware devices (CPU, PCI, USB).
• Boot Process: Understand BIOS bootloader kernel init.
• Runlevels/Targets: Manage system runlevels or systemd targets.
• Shutdown/Reboot: Control system power states.
What to Expect
• Question Types: Identify hardware commands (e.g., lspci), select correct run-
level command, or choose shutdown syntax.
• Focus: Systemd targets, hardware listing, reboot commands.
Tips
• Prioritize: Spend 1 hour on this topic (lowest weight).
• Memorize: Systemd targets (multi-user.target = runlevel 3).
• Practice: Run uname -a, lspci in a terminal.
• Test Strategy: Eliminate wrong hardware commands (e.g., lsusb for USB, not
PCI).
Must-Know Commands
Command Description
uname -r Shows kernel version
uname -m Shows system architecture
uname -a Shows all system info
lscpu Displays CPU details
lspci Lists PCI devices
lsusb Lists USB devices
runlevel Shows current/previous runlevel
systemctl isolate Switches to multi-user mode
multi-user.target
shutdown -r now Reboots immediately
wall <message> Sends message to logged-in users
Other Commands
• lspci -v: Detailed PCI device info.
• lsusb -v: Detailed USB device info.
• shutdown -h now: Shuts down immediately.
7
• halt: Shuts down system.
• poweroff: Shuts down system.
6 Exam-Taking Tips
• Time Management: 60 questions in 90 minutes (~1.5 min/question). Skip hard
questions and return later.
• Read Carefully: Watch for subtle differences (e.g., grep -i vs. grep -v, chmod
755 vs. 644).
• Practical Focus: Expect command syntax or output questions. Practice typing
commands accurately.
• Elimination: Rule out obviously wrong answers (e.g., non-existent commands).
• Rest: Sleep by 11 PM to stay sharp. Avoid cramming all night.