LCA Certified Linux Administrator Exam — Questions and Answers
Question 1: What is the most effective way to measure success in performance monitoring & tuning within LCA professional practice?
- Compare only with industry averages without considering context
- Count only the number of activities completed
- Use a combination of quantitative metrics, qualitative assessments, and stakeholder feedback aligned with defined objectives (Correct answer)
- Rely solely on supervisor opinion
Correct answer: Use a combination of quantitative metrics, qualitative assessments, and stakeholder feedback aligned with defined objectives
Effective measurement combines multiple data sources — quantitative metrics, qualitative assessments, and stakeholder feedback — all aligned with clearly defined objectives for a comprehensive evaluation.
Question 2: When a LCA professional encounters an unfamiliar challenge in cloud integration & deployment, what is the recommended first course of action?
- Postpone addressing the issue indefinitely
- Proceed based on personal intuition alone
- Research applicable standards, consult with subject matter experts, and document the approach (Correct answer)
- Apply the solution used for the most recent similar problem without adaptation
Correct answer: Research applicable standards, consult with subject matter experts, and document the approach
Professional practice requires a methodical approach to unfamiliar challenges: research the applicable standards, consult experts when needed, and document the reasoning for the chosen approach.
Question 3: What is the first step when installing Linux on a new system?
- Configuring user accounts.
- Creating a bootable installation media (Correct answer)
- Updating the kernel.
- Installing desktop environment.
Correct answer: Creating a bootable installation media
The very first step when installing Linux on a new system is to create a bootable installation media, such as a USB drive or DVD. This media contains the Linux operating system installer and allows the computer to boot into the installation environment. Without a bootable medium, the system cannot load the necessary files to begin the installation process.
Question 4: In MySQL, what does the binary log format 'ROW' record?
- The actual data changes for each affected row (Correct answer)
- The SQL statements executed
- Compressed checksums of changed pages
- Only DDL statements like CREATE and ALTER
Correct answer: The actual data changes for each affected row
ROW-based binary logging records the actual before and after values for each changed row, making replication more precise and safe than STATEMENT format.
Question 5: An administrator wants to block all traffic from subnet 10.0.5.0/24 using iptables. Which command achieves this?
- iptables -I INPUT -s 10.0.5.0/24 -j DROP (Correct answer)
- iptables -A INPUT -s 10.0.5.0/24 -j REJECT
- iptables -A OUTPUT -d 10.0.5.0/24 -j DROP
- iptables -P INPUT 10.0.5.0/24 DROP
Correct answer: iptables -I INPUT -s 10.0.5.0/24 -j DROP
Using -I inserts the rule at the top of the INPUT chain, ensuring it is evaluated before any ACCEPT rules for that subnet.
Question 6: You want to add a static route so that traffic to 10.20.0.0/24 goes through gateway 192.168.1.254 permanently on a systemd-networkd system. Where do you configure this?
- /etc/sysconfig/network-scripts/ifcfg-eth0
- /etc/network/interfaces
- /etc/iproute2/rt_tables
- A .network file in /etc/systemd/network/ with a [Route] section (Correct answer)
Correct answer: A .network file in /etc/systemd/network/ with a [Route] section
systemd-networkd reads .network files in /etc/systemd/network/ where [Route] sections define static routes.
Question 7: Which Apache configuration file format is used in Debian-based systems to enable or disable sites?
- XML files in /etc/apache2/vhosts.d/
- INI-style files in /etc/apache2/sites/
- Direct edits to /etc/apache2/httpd.conf only
- Symlinks in /etc/apache2/sites-enabled/ managed by a2ensite/a2dissite (Correct answer)
Correct answer: Symlinks in /etc/apache2/sites-enabled/ managed by a2ensite/a2dissite
Debian-based systems use a2ensite to create symlinks from sites-available to sites-enabled, which Apache reads at startup.
Question 8: In Terraform, what is the purpose of the 'terraform.tfstate' file?
- It defines variable default values for modules
- It contains the execution plan before applying changes
- It records the current state of managed infrastructure resources (Correct answer)
- It stores provider API credentials for authentication
Correct answer: It records the current state of managed infrastructure resources
The terraform.tfstate file records the current state of all resources managed by Terraform, enabling it to detect drift and plan incremental changes.
Question 9: What is the most effective way to measure success in cloud integration & deployment within LCA professional practice?
- Count only the number of activities completed
- Rely solely on supervisor opinion
- Compare only with industry averages without considering context
- Use a combination of quantitative metrics, qualitative assessments, and stakeholder feedback aligned with defined objectives (Correct answer)
Correct answer: Use a combination of quantitative metrics, qualitative assessments, and stakeholder feedback aligned with defined objectives
Effective measurement combines multiple data sources — quantitative metrics, qualitative assessments, and stakeholder feedback — all aligned with clearly defined objectives for a comprehensive evaluation.
Question 10: Which installer option in Anaconda allows automated network-based installation without user interaction?
- --unattended
- preseed
- Kickstart (Correct answer)
- --auto
Correct answer: Kickstart
Kickstart is Red Hat/Fedora's automated installation system; a Kickstart file specifies all installation parameters, enabling unattended installs.
Question 11: Which file contains the persistent mount information in Linux?
- /etc/disktab
- /etc/fstab (Correct answer)
- /etc/mtab
- /etc/mount.conf
Correct answer: /etc/fstab
The `/etc/fstab` file stores persistent mount information, meaning it defines file systems that should be mounted automatically every time the system boots. Each entry in this file specifies a device, its mount point, file system type, and various options. This ensures that critical partitions and devices are always available.
Question 12: During Linux installation, the 'swap' partition is recommended to be at least what size for a system with 8GB RAM when hibernation is required?
- 16 GB (Correct answer)
- 2 GB
- 4 GB
- 8 GB
Correct answer: 16 GB
For hibernation to work, swap must be at least as large as the amount of RAM (8GB) plus some buffer, so 16GB is the safe recommendation.
Question 13: What is the purpose of the 'mt' command in Linux backup operations?
- Control magnetic tape drive operations such as rewind, eject, and seek (Correct answer)
- Format a new tape for use
- Mount a backup tape filesystem
- List files stored on a tape archive
Correct answer: Control magnetic tape drive operations such as rewind, eject, and seek
The mt (magnetic tape) command sends control operations to a tape drive, such as rewinding, forwarding, ejecting, or seeking to a specific position.
Question 14: Which /proc file contains the kernel's command line parameters as passed by the bootloader?
- /proc/kernel/args
- /proc/bootparams
- /proc/cmdline (Correct answer)
- /proc/version
Correct answer: /proc/cmdline
/proc/cmdline contains the exact command line string that the bootloader passed to the kernel at boot time.
Question 15: What does 'dpkg --get-selections' output?
- Packages available in the repository
- Packages selected for upgrade
- Only explicitly installed packages
- A list of all packages and their installation states (Correct answer)
Correct answer: A list of all packages and their installation states
dpkg --get-selections lists all packages known to dpkg along with their current state (install, deinstall, purge, hold).
Question 16: Which command shows which SELinux Boolean values are currently enabled?
- getsebool -a (Correct answer)
- seinfo --bool
- sestatus -b
- semanage boolean -l
Correct answer: getsebool -a
getsebool -a lists all SELinux Booleans and their current (on/off) state.
Question 17: Which command backs up a single PostgreSQL database to a file?
- pg_dump dbname > file.sql (Correct answer)
- psql dump dbname file.sql
- pgdump dbname > file.sql
- postgres-backup dbname file.sql
Correct answer: pg_dump dbname > file.sql
pg_dump is the PostgreSQL utility that creates a consistent backup of a single database in SQL or custom format.
Question 18: Which namespace type isolates process IDs between containers?
- net namespace
- pid namespace (Correct answer)
- mnt namespace
- uts namespace
Correct answer: pid namespace
PID namespaces give each container its own process ID numbering, so PIDs don't collide between containers.
Question 19: What role does continuous improvement play in package management & software installation for LCA certified professionals?
- It focuses exclusively on cost reduction
- It is optional and only necessary during certification renewal
- It applies only to new professionals in their first year
- It drives ongoing enhancement of practices, processes, and outcomes through systematic evaluation (Correct answer)
Correct answer: It drives ongoing enhancement of practices, processes, and outcomes through systematic evaluation
Continuous improvement is fundamental to professional practice in package management & software installation, involving regular evaluation, feedback integration, and process enhancement to maintain high standards.
Question 20: Which command shows memory usage broken down by shared, private, and anonymous mappings for a specific process?
- pmap -x <pid>
- cat /proc/<pid>/smaps
- Both /proc/<pid>/smaps and pmap -x provide this detail (Correct answer)
- free -m
Correct answer: Both /proc/<pid>/smaps and pmap -x provide this detail
Both /proc/<pid>/smaps and pmap -x <pid> show detailed per-mapping memory breakdown including shared and private pages.
Question 21: What does the SGID bit do when set on a directory?
- New files created inside inherit the directory's group (Correct answer)
- Only the owner can read files inside
- Files run as the directory owner's UID
- Prevents file deletion by non-owners
Correct answer: New files created inside inherit the directory's group
The SGID bit on a directory causes newly created files and subdirectories to inherit the directory's group ownership.
Question 22: Which command would you use to restore a specific file 'etc/passwd' from a tar archive 'backup.tar.gz'?
- tar -xzf backup.tar.gz etc/passwd (Correct answer)
- tar -czf backup.tar.gz etc/passwd
- tar -tzf backup.tar.gz etc/passwd
- tar -rzf backup.tar.gz etc/passwd
Correct answer: tar -xzf backup.tar.gz etc/passwd
tar -xzf extracts (-x) from a gzip-compressed (-z) archive file (-f), and specifying 'etc/passwd' restores only that file.
Question 23: What does the MySQL innodb_flush_log_at_trx_commit=1 setting guarantee?
- Logs are flushed every second regardless of transactions
- InnoDB skips log flushing for performance
- Logs are written only when the buffer is full
- Logs are flushed to disk on every transaction commit ensuring ACID compliance (Correct answer)
Correct answer: Logs are flushed to disk on every transaction commit ensuring ACID compliance
Setting innodb_flush_log_at_trx_commit=1 ensures the redo log is flushed to disk at every commit, providing full ACID durability.
Question 24: What does the 'noatime' mount option do?
- Disables creation time tracking
- Mounts the filesystem read-only
- Disables access time updates on reads (Correct answer)
- Prevents file modification timestamps from updating
Correct answer: Disables access time updates on reads
noatime prevents updating the atime (access time) inode field on every read, reducing disk writes.
Question 25: You run 'perf stat ./myapp' and see a very low Instructions Per Cycle (IPC). What is the most likely bottleneck?
- Memory latency or cache misses causing the CPU to stall (Correct answer)
- Network packet loss
- Disk I/O wait
- Excessive context switching
Correct answer: Memory latency or cache misses causing the CPU to stall
Low IPC typically means the CPU is stalling while waiting for data from cache or RAM.
Question 26: Which Linux installation method allows installation over the network?
- Dual boot installation.
- Live CD installation.
- PXE Boot Network installation (Correct answer)
- USB stick installation.
Correct answer: PXE Boot Network installation
PXE (Preboot eXecution Environment) Boot Network installation is a method that allows a computer to boot and install an operating system over a network without needing local storage or an optical drive. This is particularly useful for deploying Linux to multiple machines efficiently in a corporate or data center environment. It centralizes the installation process and reduces manual effort.
Question 27: What is the correct way to source a file named `config.sh` in the current shell?
- . config.sh (Correct answer)
- include config.sh
- exec config.sh
- run config.sh
Correct answer: . config.sh
The dot (`.`) command or `source` built-in reads and executes commands from the file in the current shell environment.
Question 28: Which file defines system-wide environment variables applied at login on most Linux distributions?
- /root/.bash_profile
- /etc/bashrc
- /etc/environment (Correct answer)
- /etc/profile.d/env.sh
Correct answer: /etc/environment
/etc/environment is a PAM-read file that sets system-wide environment variables for all sessions regardless of shell.
Question 29: Which firewalld zone is most appropriate for a highly trusted internal network interface?
- public
- internal
- dmz
- trusted (Correct answer)
Correct answer: trusted
The 'trusted' zone in firewalld accepts all connections and is designed for fully trusted networks.
Question 30: What does the XFS 'xfs_growfs' command do?
- Adds a new device to an XFS volume
- Increases the XFS journal size
- Defragments and compacts an XFS filesystem
- Expands a mounted XFS filesystem to fill available space on its underlying device (Correct answer)
Correct answer: Expands a mounted XFS filesystem to fill available space on its underlying device
xfs_growfs can expand an XFS filesystem online (while mounted) to use newly added space on the underlying block device.
Question 31: When building an RPM package, which directory structure is expected under the RPM build root?
- input, output, build, release, source
- compile, package, install, test, publish
- src, bin, lib, doc, spec
- BUILD, RPMS, SOURCES, SPECS, SRPMS (Correct answer)
Correct answer: BUILD, RPMS, SOURCES, SPECS, SRPMS
The rpmbuild process expects the standard directory structure: SOURCES for tarballs, SPECS for spec files, BUILD for compilation, RPMS for binary RPMs, and SRPMS for source RPMs.
Question 32: Which feature of LVM is commonly used to enable consistent online backups of a running system?
- LVM snapshots (Correct answer)
- LVM thin provisioning
- LVM striping
- LVM mirroring
Correct answer: LVM snapshots
LVM snapshots create a point-in-time copy of a logical volume that can be backed up while the source volume remains online and in use.
Question 33: Which command verifies the integrity of an ext4 filesystem and is typically run only when the filesystem is unmounted?
- e2image
- fsck.ext4 (Correct answer)
- tune2fs
- debugfs
Correct answer: fsck.ext4
fsck.ext4 checks and repairs an ext4 filesystem for errors; it must be run on an unmounted filesystem to avoid data corruption.
Question 34: What does the Linux OOM killer do, and which /proc file stores each process's OOM score?
- It terminates processes to free memory; scores are in /proc/<pid>/oom_score (Correct answer)
- It moves processes to swap; scores are in /proc/<pid>/smaps
- It pauses processes until memory is available; scores are in /proc/<pid>/status
- It logs memory errors to syslog; scores are in /proc/meminfo
Correct answer: It terminates processes to free memory; scores are in /proc/<pid>/oom_score
When memory is exhausted, the OOM killer selects a victim using /proc/<pid>/oom_score and kills it.
Question 35: Which command checks the syntax of an Nginx configuration file without restarting the service?
- systemctl verify nginx
- nginx -s reload
- nginx -t (Correct answer)
- nginx --check
Correct answer: nginx -t
nginx -t tests the configuration file for syntax errors and reports the result without affecting the running process.
Question 36: What is the effect of setting /proc/sys/kernel/sched_migration_cost_ns to a higher value?
- The scheduler is less likely to migrate tasks between CPUs, improving cache locality at the cost of load balance speed (Correct answer)
- Context switches happen less often overall
- The scheduler increases the time slice for each task
- Tasks migrate more frequently, improving CPU utilization
Correct answer: The scheduler is less likely to migrate tasks between CPUs, improving cache locality at the cost of load balance speed
A higher sched_migration_cost_ns makes migrations more expensive in the scheduler's cost model, favoring cache-hot execution.
Question 37: Which command shows the inode usage of all mounted filesystems?
- tune2fs -l /dev/sda1
- df -i (Correct answer)
- ls -li
- stat -f /
Correct answer: df -i
df -i reports inode usage (used, free, and percentage) for each mounted filesystem.
Question 38: A file has permissions -rwsr-xr-x. What does the 's' in the owner execute position indicate?
- SGID bit is set
- Sticky bit is set
- SUID bit is set (Correct answer)
- The file is a symbolic link
Correct answer: SUID bit is set
An 's' replacing the owner execute bit means the SUID bit is set, causing the file to run as its owner.
Question 39: Which command displays the numeric UID and GID of the current user along with all supplementary group memberships?
- whoami
- groups
- finger
- id (Correct answer)
Correct answer: id
The id command shows the current user's UID, primary GID, and all supplementary group IDs.
Question 40: What does 'dpkg -l' output?
- Package changelog entries
- Only installed packages with file lists
- Packages available but not installed
- A table listing all packages with their status, version, and description (Correct answer)
Correct answer: A table listing all packages with their status, version, and description
dpkg -l lists all packages known to dpkg with their status codes (ii=installed, rc=removed with config files remaining, etc.).
Question 41: How should LCA professionals handle confidential information related to network configuration & troubleshooting?
- Delete all records after project completion
- Store information without any security measures
- Follow established protocols for data protection, access control, and disclosure in accordance with applicable regulations (Correct answer)
- Share freely with all colleagues for transparency
Correct answer: Follow established protocols for data protection, access control, and disclosure in accordance with applicable regulations
Confidential information must be handled according to established protocols, regulatory requirements, and professional ethics standards, including proper access control and disclosure procedures.
Question 42: What does the 'nft list ruleset' command do?
- Displays the complete nftables ruleset including tables, chains, and rules (Correct answer)
- Lists all open ports using nftables probes
- Lists all active iptables rules
- Shows firewalld zones and their rules
Correct answer: Displays the complete nftables ruleset including tables, chains, and rules
'nft list ruleset' outputs the full nftables configuration including all tables, chains, and rules in a readable format.
Question 43: When a LCA professional encounters an unfamiliar challenge in web server & database administration, what is the recommended first course of action?
- Research applicable standards, consult with subject matter experts, and document the approach (Correct answer)
- Apply the solution used for the most recent similar problem without adaptation
- Postpone addressing the issue indefinitely
- Proceed based on personal intuition alone
Correct answer: Research applicable standards, consult with subject matter experts, and document the approach
Professional practice requires a methodical approach to unfamiliar challenges: research the applicable standards, consult experts when needed, and document the reasoning for the chosen approach.
Question 44: Which useradd option specifies a comment (GECOS field) such as the user's full name?
- -d
- -s
- -g
- -c (Correct answer)
Correct answer: -c
The -c option sets the GECOS/comment field, typically used for the user's full name or description.
Question 45: What does the 'fuser' command identify when run against a specific file or device?
- All files that a specific user has opened
- The filesystem type of the specified device
- The PIDs of processes that currently have the file or device open (Correct answer)
- The user who owns the file or device
Correct answer: The PIDs of processes that currently have the file or device open
fuser reports the PIDs of processes using a specified file, directory, or socket, which is useful for diagnosing 'device is busy' errors.
Question 46: A sysadmin needs to add a second disk to an existing LVM volume group. Which sequence is correct?
- fdisk → lvextend → vgextend
- vgcreate → pvcreate → lvextend
- pvcreate → vgextend → lvextend (Correct answer)
- vgextend → pvcreate → lvextend
Correct answer: pvcreate → vgextend → lvextend
You must first initialize the disk as a physical volume (pvcreate), then add it to the volume group (vgextend), then optionally extend logical volumes (lvextend).
Question 47: What does the 'rpm -e' command do?
- Exports a package to a file
- Evaluates package dependencies
- Erases (uninstalls) a specified package (Correct answer)
- Edits a package's metadata
Correct answer: Erases (uninstalls) a specified package
rpm -e (erase) removes an installed package from the system while checking for dependent packages.
Question 48: Which libvirt tool is used to manage virtual networks from the command line?
- virt-install
- virt-manager
- virsh (Correct answer)
- qemu-system-x86_64
Correct answer: virsh
virsh is the command-line interface for libvirt and can manage networks, domains, storage, and more.
Question 49: Which PostgreSQL command grants all privileges on a database to a user?
- ALTER USER user SUPERUSER
- GRANT FULL dbname TO user
- GRANT ALL ON DATABASE dbname TO user (Correct answer)
- PERMIT ALL ON dbname FOR user
Correct answer: GRANT ALL ON DATABASE dbname TO user
GRANT ALL ON DATABASE dbname TO user gives the specified user all privileges (CREATE, CONNECT, TEMP) on that database.
Question 50: What is the default umask value for regular users on most Linux distributions?
- 0002
- 0755
- 0022 (Correct answer)
- 0077
Correct answer: 0022
The default umask for regular users is typically 0022, giving new files 644 and new directories 755 permissions.
Question 51: What is the function of the '--link-dest' option in rsync?
- Set the destination directory for the backup
- Link two remote rsync daemons together
- Create symbolic links to the backup source
- Create hard links to unchanged files from a previous backup, saving disk space (Correct answer)
Correct answer: Create hard links to unchanged files from a previous backup, saving disk space
--link-dest causes rsync to hard-link files that are unchanged from a reference directory, enabling space-efficient snapshot-style backups.
Question 52: In a GitLab CI/CD pipeline, what does the 'only: - main' directive control?
- The job runs only if the pipeline was triggered manually on main
- The job runs only when the main branch is deleted
- The job runs only for merge requests targeting main
- The job runs only when changes are pushed to the main branch (Correct answer)
Correct answer: The job runs only when changes are pushed to the main branch
The 'only: - main' directive restricts the job to execute only when commits are pushed to the branch named 'main'.
Question 53: How do you prevent a specific package from being upgraded by apt on a Debian system?
- apt pin <package>
- apt-mark hold <package> (Correct answer)
- dpkg --lock <package>
- apt-mark freeze <package>
Correct answer: apt-mark hold <package>
apt-mark hold prevents a package from being automatically installed, upgraded, or removed by apt.
Question 54: What is a Docker volume bind mount used for?
- Creating a read-only container layer
- Mounting a host directory path into a container (Correct answer)
- Sharing volumes between Docker registries
- Encrypting container filesystem data
Correct answer: Mounting a host directory path into a container
A bind mount maps a specific host filesystem path into the container, allowing direct access to host files.
Question 55: Which systemctl command enables a service to start automatically at system boot?
- systemctl boot
- systemctl start
- systemctl activate
- systemctl enable (Correct answer)
Correct answer: systemctl enable
systemctl enable creates the necessary symlinks so the service is started during the appropriate boot target automatically.
Question 56: During installation, what does setting the root password accomplish?
- It encrypts the home directory.
- It disables SSH access.
- It creates a guest user.
- It secures the admin account (Correct answer)
Correct answer: It secures the admin account
Setting the root password during Linux installation is crucial for securing the superuser account, known as 'root'. This password grants administrative privileges, allowing full control over the system. A strong root password prevents unauthorized users from gaining complete access and compromising system security.
Question 57: What is the purpose of Apache's mod_proxy_fcgi module?
- Provides load balancing across multiple Apache instances
- Caches FastCGI responses on disk
- Forwards requests to FastCGI backends such as PHP-FPM (Correct answer)
- Proxies WebSocket connections to backend servers
Correct answer: Forwards requests to FastCGI backends such as PHP-FPM
mod_proxy_fcgi allows Apache to forward requests to FastCGI applications (like PHP-FPM) using the FastCGI protocol.
Question 58: Which file configures system-wide PAM password quality requirements on RHEL-based systems?
- /etc/pam.d/passwd
- /etc/security/pwquality.conf (Correct answer)
- /etc/login.defs
- /etc/shadow
Correct answer: /etc/security/pwquality.conf
pwquality.conf is read by the pam_pwquality module to enforce password complexity rules.
Question 59: Which command restores files interactively from a dump archive, allowing you to select specific files?
- restore -x
- restore -r
- restore -i (Correct answer)
- restore -t
Correct answer: restore -i
restore -i starts an interactive shell where you can browse and selectively extract files from a dump archive.
Question 60: Which command shows all current iptables rules in the filter table with line numbers?
- iptables -L --line-numbers
- iptables -S -n
- iptables --show-rules
- iptables -t filter -L -n --line-numbers (Correct answer)
Correct answer: iptables -t filter -L -n --line-numbers
Combining -t filter, -L (list), -n (numeric), and --line-numbers gives a numbered, numeric listing of filter table rules.
LCA Certified Linux Administrator Exam
The LCA Certified Linux Administrator certification validates the fundamental skills required to administer Linux systems, including installation, configuration, and basic troubleshooting.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds