LCA Certified Linux Administrator Exam — Questions and Answers
Question 1: In Bacula, which daemon manages job scheduling, client catalog, and coordinates the overall backup/restore process?
- Storage Daemon (bacula-sd)
- Director (bacula-dir) (Correct answer)
- Console (bconsole)
- File Daemon (bacula-fd)
Correct answer: Director (bacula-dir)
The Bacula Director (bacula-dir) is the central control daemon that schedules jobs, maintains the catalog, and coordinates all backup and restore operations.
Question 2: An administrator wants to block all traffic from subnet 10.0.5.0/24 using iptables. Which command achieves this?
- iptables -A OUTPUT -d 10.0.5.0/24 -j DROP
- iptables -A INPUT -s 10.0.5.0/24 -j REJECT
- iptables -P INPUT 10.0.5.0/24 DROP
- iptables -I INPUT -s 10.0.5.0/24 -j DROP (Correct answer)
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 3: What port number does SSH use by default?
- 80
- 443
- 21
- 22 (Correct answer)
Correct answer: 22
SSH (Secure Shell) uses port 22 by default for secure remote access to Linux systems. This port is standardized for SSH connections, allowing encrypted communication and secure command execution over an unsecured network. While it's common practice to change this default port for added security, 22 remains the standard.
Question 4: Which command in MySQL shows all currently running queries and their status?
- SHOW FULL PROCESSLIST (Correct answer)
- SHOW STATUS LIKE 'Threads%'
- SELECT * FROM information_schema.QUERIES
- SHOW ACTIVE CONNECTIONS
Correct answer: SHOW FULL PROCESSLIST
SHOW FULL PROCESSLIST displays all active threads in the MySQL server including query text, state, and execution time.
Question 5: Which of the following best describes a key competency required for user & permission management in LCA practice?
- Reliance on a single methodology for all situations
- The ability to work independently without any oversight
- Memorization of all relevant regulations without understanding context
- Strong analytical skills combined with effective communication and ethical judgment (Correct answer)
Correct answer: Strong analytical skills combined with effective communication and ethical judgment
LCA professionals working in user & permission management need analytical skills to assess situations, communication skills to convey findings, and ethical judgment to make sound decisions.
Question 6: Which command pins a process or command to specific CPU cores using a CPU affinity mask?
- taskset (Correct answer)
- cgroup
- numactl
- cpuset
Correct answer: taskset
taskset sets or retrieves a process's CPU affinity, controlling which cores it may run on.
Question 7: Which zypper command is used to search for a package by name on SUSE Linux?
- zypper lookup
- zypper query
- zypper find
- zypper search (Correct answer)
Correct answer: zypper search
zypper search (or zypper se) searches for packages by name or description in configured repositories.
Question 8: What information does 'rpm -qi <package>' display?
- A list of files installed by the package
- The package's changelog entries only
- Detailed package information including version, architecture, description, and install date (Correct answer)
- Package installation dependencies only
Correct answer: Detailed package information including version, architecture, description, and install date
rpm -qi (query info) shows package metadata such as name, version, release, architecture, size, description, and installation date.
Question 9: What is the role of 'createrepo' command on RPM-based systems?
- Downloads RPMs to create a local repo
- Creates an RPM spec file
- Creates a new empty RPM repository
- Creates repository metadata from a directory of RPM files (Correct answer)
Correct answer: Creates repository metadata from a directory of RPM files
createrepo generates the repodata/ directory with XML metadata that makes a directory of RPMs usable as a YUM/DNF repository.
Question 10: Which tar option appends new files to an existing archive without re-creating it?
- --create (-c)
- --concatenate (-A)
- --update (-u)
- --append (-r) (Correct answer)
Correct answer: --append (-r)
The -r (--append) option adds files to the end of an existing tar archive without modifying existing entries.
Question 11: Which tool provides a flame graph-compatible call-stack profiler for on-CPU and off-CPU analysis in Linux?
- strace -c
- perf record + perf script (Correct answer)
- gprof
- valgrind --callgrind
Correct answer: perf record + perf script
perf record captures stack samples; perf script outputs them for flame graph generation with stackcollapse tools.
Question 12: What is 'Flatpak' and how does it differ from traditional package management?
- A faster version of the apt package manager
- A cross-distro replacement for RPM
- A container format for system packages
- A sandboxed application distribution system that bundles dependencies, independent of the host OS (Correct answer)
Correct answer: A sandboxed application distribution system that bundles dependencies, independent of the host OS
Flatpak distributes self-contained applications in sandboxes with bundled dependencies, allowing the same package to run on any Linux distribution.
Question 13: What is the effect of setting /proc/sys/kernel/sched_migration_cost_ns to a higher value?
- Context switches happen less often overall
- The scheduler increases the time slice for each task
- Tasks migrate more frequently, improving CPU utilization
- The scheduler is less likely to migrate tasks between CPUs, improving cache locality at the cost of load balance speed (Correct answer)
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 14: In /etc/fstab, what does the fifth field (fs_freq) control?
- Mount frequency in seconds
- The number of reserved blocks
- The fsck check order at boot
- Whether dump backs up the filesystem (Correct answer)
Correct answer: Whether dump backs up the filesystem
The fifth field is used by the dump utility to determine which filesystems need to be backed up.
Question 15: Which AWS service provides a managed Kubernetes control plane?
- AWS ECS
- AWS Fargate
- AWS Batch
- AWS EKS (Correct answer)
Correct answer: AWS EKS
Amazon Elastic Kubernetes Service (EKS) provides a managed Kubernetes control plane, removing the need to install and operate your own.
Question 16: What is the function of the 'bonding' kernel module in Linux networking?
- It encrypts traffic between two NICs
- It creates virtual VLAN interfaces
- It aggregates multiple network interfaces into a single logical interface for redundancy or throughput (Correct answer)
- It limits bandwidth on an interface using traffic shaping
Correct answer: It aggregates multiple network interfaces into a single logical interface for redundancy or throughput
Bonding (Link Aggregation) combines multiple NICs into one bond interface, supporting modes like active-backup and LACP.
Question 17: What is the most effective way to measure success in web server & database administration within LCA professional practice?
- 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)
- Count only the number of activities completed
- 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 18: How should LCA professionals handle confidential information related to backup & disaster recovery?
- 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 19: A file is owned by root with permissions -rwxr-xr-x. A regular user runs the file. Under which UID does the process execute?
- An anonymous UID assigned at runtime
- UID 0 (root)
- The file's group GID
- The user's own UID (Correct answer)
Correct answer: The user's own UID
Without the SUID bit, processes always run as the UID of the user who launched them, regardless of file ownership.
Question 20: Which tool is best suited for parsing and transforming structured text using field separators in a shell pipeline?
- sort
- find
- grep
- awk (Correct answer)
Correct answer: awk
awk is designed for field-based text processing and supports custom field separators with the -F option.
Question 21: Which file persists custom hostname-to-IP mappings on Linux and is consulted before DNS by default?
- /etc/hostname
- /etc/resolv.conf
- /etc/nsswitch.conf
- /etc/hosts (Correct answer)
Correct answer: /etc/hosts
The /etc/hosts file provides static hostname-to-IP mappings and is typically checked before DNS per /etc/nsswitch.conf order.
Question 22: In the context of LCA certification, what is the most important consideration when implementing backup & disaster recovery?
- Minimizing documentation to save time
- Ensuring alignment with established standards, stakeholder needs, and best practices (Correct answer)
- Delegating all responsibilities to junior staff
- Completing implementation as quickly as possible regardless of quality
Correct answer: Ensuring alignment with established standards, stakeholder needs, and best practices
When implementing backup & disaster recovery, LCA professionals must ensure alignment with industry standards and stakeholder needs. Hasty implementation without proper planning often leads to compliance issues and suboptimal outcomes.
Question 23: What is the effect of `chmod +x script.sh` on a script that has no execute bit set?
- Adds execute permission for the owner only
- Adds read and execute permissions
- Adds execute permission for owner, group, and others (Correct answer)
- Makes the file immutable
Correct answer: Adds execute permission for owner, group, and others
Using `+x` without specifying a user class adds execute permission to all three classes: user, group, and other.
Question 24: What is the recommended way to permanently apply sysctl tuning parameters across reboots?
- Write them to /proc/sys/ in a startup script
- Add the parameters to a file in /etc/sysctl.d/ and run sysctl --system (Correct answer)
- Set them in /etc/security/limits.conf
- Add them to /etc/rc.local
Correct answer: Add the parameters to a file in /etc/sysctl.d/ and run sysctl --system
Files in /etc/sysctl.d/ are loaded at boot by systemd-sysctl; 'sysctl --system' applies them immediately without rebooting.
Question 25: When configuring MariaDB binary logging for replication, which configuration file option enables it?
- binlog=ON
- enable_binlog=1
- log_bin=/var/log/mysql/mysql-bin (Correct answer)
- replication_log=ON
Correct answer: log_bin=/var/log/mysql/mysql-bin
Setting log_bin in my.cnf with a file path enables binary logging, which is required for MySQL/MariaDB replication.
Question 26: In Amanda backup software, what is the role of the 'holding disk'?
- Temporary staging area before data is written to tape or final media (Correct answer)
- The primary backup target disk
- Encrypted key storage for backups
- A mirrored copy of the backup catalog
Correct answer: Temporary staging area before data is written to tape or final media
Amanda's holding disk is a local staging area where backups spool before being flushed to the final backup medium, improving throughput.
Question 27: What does the 'relatime' mount option do compared to 'atime'?
- Updates atime once per day maximum
- Updates atime only if the file was modified or accessed before its current atime (Correct answer)
- Disables atime entirely
- Updates atime relative to modification time
Correct answer: Updates atime only if the file was modified or accessed before its current atime
relatime only updates atime when the previous atime is older than the mtime or ctime, reducing unnecessary writes.
Question 28: Which field in /etc/fstab specifies the order in which fsck checks filesystems at boot?
- Third field (fs_vfstype)
- Sixth field (fs_passno) (Correct answer)
- Fifth field (fs_freq)
- Fourth field (fs_mntops)
Correct answer: Sixth field (fs_passno)
The sixth field (fs_passno) determines fsck check order; root is typically 1, other filesystems 2, and 0 means skip.
Question 29: What does the 'dnf group install' command do on RHEL/CentOS systems?
- Installs a predefined collection of related packages (Correct answer)
- Groups installed packages by category
- Installs packages for a specific user group
- Installs dependencies only for a package group
Correct answer: Installs a predefined collection of related packages
dnf group install installs a package group, which is a curated set of related packages (e.g., 'Development Tools').
Question 30: A server shows high CPU steal time (st) in top. What does this indicate?
- The kernel is stealing CPU from user processes for system tasks
- The CPU governor is throttling frequency
- A hypervisor is consuming CPU cycles that the VM requested, indicating resource contention on the host (Correct answer)
- Processes are being preempted by higher-priority tasks
Correct answer: A hypervisor is consuming CPU cycles that the VM requested, indicating resource contention on the host
CPU steal time appears in virtualized environments when the hypervisor is running other guests and cannot service this VM's requests.
Question 31: What is the effect of running 'vgreduce vg0 /dev/sdb' without pvmove first?
- Fails if /dev/sdb still holds active physical extents (Correct answer)
- Shrinks the VG by the PV size and pads with zeros
- Removes /dev/sdb and destroys all data on it
- Moves all extents to remaining PVs automatically
Correct answer: Fails if /dev/sdb still holds active physical extents
vgreduce refuses to remove a PV that still contains allocated physical extents; pvmove must be run first.
Question 32: What does the dump level 0 signify in the dump/restore backup utility?
- Full backup of the entire filesystem (Correct answer)
- Archive of only modified inodes
- Differential backup since last full backup
- Incremental backup since last dump level 0
Correct answer: Full backup of the entire filesystem
Dump level 0 always means a complete (full) backup of the entire filesystem; higher numbers back up changes since the last lower-numbered dump.
Question 33: In a bash script, which syntax correctly passes an array as individual arguments to a function?
- func $(arr)
- func "${arr[@]}" (Correct answer)
- func "${arr[*]}"
- func $arr
Correct answer: func "${arr[@]}"
`"${arr[@]}"` expands each array element as a separate quoted word, preserving elements with spaces.
Question 34: What does 'numactl --membind' do when running a process on a NUMA system?
- Sets the process memory limit
- Enables huge page allocation for the process
- Binds the process to specific CPU cores only
- Restricts memory allocations to specified NUMA nodes, reducing cross-node memory latency (Correct answer)
Correct answer: Restricts memory allocations to specified NUMA nodes, reducing cross-node memory latency
numactl --membind forces memory allocations to the listed NUMA nodes, improving locality for memory-intensive workloads.
Question 35: What does the 'UUID=' syntax in /etc/fstab provide compared to using device names like /dev/sda1?
- Faster mount times
- Required for LVM volumes
- Stable identification that survives disk reordering (Correct answer)
- Enables TRIM on SSDs
Correct answer: Stable identification that survives disk reordering
UUIDs uniquely identify filesystems regardless of which /dev/sdX name the kernel assigns, preventing boot failures when disk enumeration order changes.
Question 36: Which file in a Debian-based system contains the list of APT repository sources?
- /etc/apt/repos.conf
- /etc/dpkg/sources.list
- /etc/apt/sources.list (Correct answer)
- /var/lib/apt/sources
Correct answer: /etc/apt/sources.list
The /etc/apt/sources.list file (and files in /etc/apt/sources.list.d/) define where APT looks for packages.
Question 37: Which command locks a user account by prepending '!' to the password hash in /etc/shadow?
- chage -E 0 username
- passwd -d username
- userdel -r username
- usermod -L username (Correct answer)
Correct answer: usermod -L username
usermod -L locks an account by inserting '!' before the password hash, preventing password-based login.
Question 38: Which Apache module enables URL rewriting using regular expressions?
- mod_redirect
- mod_alias
- mod_rewrite (Correct answer)
- mod_map
Correct answer: mod_rewrite
mod_rewrite provides a powerful rule-based URL rewriting engine using Perl-compatible regular expressions via RewriteRule and RewriteCond directives.
Question 39: What does the 'ip link set eth0 mtu 9000' command do?
- Assigns 9000 as the VLAN ID for eth0
- Configures the MTU of eth0 to 9000 bytes for jumbo frames (Correct answer)
- Limits eth0 to 9000 simultaneous connections
- Sets the maximum transmission rate to 9000 Mbps
Correct answer: Configures the MTU of eth0 to 9000 bytes for jumbo frames
Setting MTU to 9000 enables jumbo frames, which can improve throughput on high-speed LAN segments that support it.
Question 40: How do you prevent a specific package from being upgraded by apt on a Debian system?
- apt-mark hold <package> (Correct answer)
- apt-mark freeze <package>
- apt pin <package>
- dpkg --lock <package>
Correct answer: apt-mark hold <package>
apt-mark hold prevents a package from being automatically installed, upgraded, or removed by apt.
Question 41: 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)
- Postpone addressing the issue indefinitely
- Apply the solution used for the most recent similar problem without adaptation
- 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 42: What is the purpose of 'nice' and 'renice' commands in Linux performance tuning?
- Modifying the I/O scheduler for a process
- Pinning a process to a specific CPU core
- Changing a process's memory limit
- Adjusting a process's scheduling priority to influence CPU time allocation (Correct answer)
Correct answer: Adjusting a process's scheduling priority to influence CPU time allocation
nice and renice set a process's niceness value, which affects its priority in the CPU scheduler.
Question 43: How do you declare a variable in a shell script?
- VAR=value (Correct answer)
- var = value
- VAR = value
- set VAR value
Correct answer: VAR=value
To declare and assign a value to a variable in a shell script, you use the syntax `VAR=value` without any spaces around the equals sign. This assigns the string 'value' to the variable named 'VAR'. Spaces would cause the shell to interpret `VAR` as a command and `=` as its argument, leading to an error.
Question 44: What is the purpose of the 'apt-cache showpkg' command?
- Lists all cached package files
- Displays package dependency and reverse-dependency information (Correct answer)
- Shows the package cache size
- Shows the package installation log
Correct answer: Displays package dependency and reverse-dependency information
apt-cache showpkg displays detailed information about a package including its dependencies and packages that depend on it.
Question 45: In a Btrfs filesystem, what is a 'subvolume'?
- A snapshot of a directory
- A Btrfs RAID member
- An independently mountable POSIX file tree within a Btrfs volume (Correct answer)
- A partition within a Btrfs device
Correct answer: An independently mountable POSIX file tree within a Btrfs volume
A Btrfs subvolume is an independently snapshotted and mountable file tree namespace within a single Btrfs volume.
Question 46: Which command verifies the integrity of an ext4 filesystem and is typically run only when the filesystem is unmounted?
- fsck.ext4 (Correct answer)
- debugfs
- tune2fs
- e2image
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 47: What does the XFS 'xfs_growfs' command do?
- Adds a new device to an XFS volume
- Defragments and compacts an XFS filesystem
- Increases the XFS journal size
- 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 48: Which SELinux command is used to change a file's security context permanently?
- setsebool
- semanage fcontext (Correct answer)
- chcon
- restorecon
Correct answer: semanage fcontext
semanage fcontext adds a persistent policy rule, while chcon only changes the context temporarily.
Question 49: What command exports a Docker image as a tar archive that can be transferred to another host?
- docker commit mycontainer image.tar
- docker save myimage -o image.tar (Correct answer)
- docker push myimage image.tar
- docker export myimage > image.tar
Correct answer: docker save myimage -o image.tar
'docker save' exports one or more images to a tar archive, preserving layers and metadata for later import with 'docker load'.
Question 50: What does the Docker flag '--privileged' do when starting a container?
- Enables network isolation for the container
- Limits the container to read-only filesystem access
- Runs the container as a non-root user
- Grants the container near-full host kernel access (Correct answer)
Correct answer: Grants the container near-full host kernel access
--privileged disables most container security restrictions, giving the container almost the same access to the host kernel as a root process.
Question 51: When building an RPM package, which directory structure is expected under the RPM build root?
- compile, package, install, test, publish
- src, bin, lib, doc, spec
- BUILD, RPMS, SOURCES, SPECS, SRPMS (Correct answer)
- input, output, build, release, source
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 52: What does the MySQL EXPLAIN statement reveal?
- User privileges for a given query
- The table schema and column definitions
- Currently running transactions and locks
- The query execution plan chosen by the optimizer (Correct answer)
Correct answer: The query execution plan chosen by the optimizer
EXPLAIN shows how MySQL's query optimizer plans to execute a SELECT statement, including index usage and row estimates.
Question 53: What does the Linux command 'iptables' manage?
- File permissions
- User accounts
- Network traffic filtering (Correct answer)
- Service daemons
Correct answer: Network traffic filtering
`iptables` is a command-line utility that allows system administrators to configure the Linux kernel firewall (netfilter). It is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. This enables precise control over incoming and outgoing network traffic, enhancing system security.
Question 54: During installation, what does setting the root password accomplish?
- It disables SSH access.
- It secures the admin account (Correct answer)
- It creates a guest user.
- It encrypts the home directory.
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 55: What does the 'kickstart' file do in automated Linux installations?
- Automates installation using predefined settings (Correct answer)
- Creates backup images.
- Manually configures network settings.
- Updates the system after installation.
Correct answer: Automates installation using predefined settings
A kickstart file is a configuration file used in automated Linux installations, particularly with Red Hat-based distributions. It contains all the necessary information, such as partition layouts, network settings, and package selections, to perform an unattended installation. This allows for consistent and rapid deployment of multiple systems without manual intervention.
Question 56: Which LVM command extends a logical volume AND resizes its ext4 filesystem in one step?
- vgextend vg0 +10G
- lvextend -r -L +10G /dev/vg0/lv0 (Correct answer)
- resize2fs /dev/vg0/lv0
- lvresize /dev/vg0/lv0 +10G
Correct answer: lvextend -r -L +10G /dev/vg0/lv0
lvextend -r (--resizefs) calls resize2fs automatically after extending the LV.
Question 57: Which command removes user 'carol' and deletes her home directory and mail spool?
- usermod -d /dev/null carol
- userdel carol
- deluser --purge carol
- userdel -r carol (Correct answer)
Correct answer: userdel -r carol
userdel -r removes the user account along with the home directory and mail spool.
Question 58: What does 'apt-get install --no-install-recommends' do differently from a standard install?
- Installs only required dependencies, skipping recommended packages (Correct answer)
- Installs without asking for confirmation
- Installs recommended packages instead of required ones
- Skips optional and suggested packages only
Correct answer: Installs only required dependencies, skipping recommended packages
The --no-install-recommends flag tells apt to install only mandatory dependencies, not the 'Recommends' listed by the package.
Question 59: What is the purpose of the Apache mod_status module?
- Provide a real-time server activity page (Correct answer)
- Log HTTP status codes to syslog
- Compress server responses
- Return custom error pages
Correct answer: Provide a real-time server activity page
mod_status exposes a /server-status endpoint showing real-time Apache performance metrics and active connections.
Question 60: What is the purpose of an IAM role attached to an EC2 instance?
- To set the root password for the instance
- To configure VPC routing rules for the instance
- To assign a static IP address to the instance
- To allow the instance to make AWS API calls without embedded credentials (Correct answer)
Correct answer: To allow the instance to make AWS API calls without embedded credentials
An IAM role attached to an EC2 instance provides temporary credentials so the instance can call AWS APIs without storing long-term access keys.
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