Linux Foundation LFCA Practice Questions with Explanations
Free Linux Foundation LFCA practice questions. 23 of them, each with the correct answer, a full explanation, and the reason every other option is wrong.
LFCA practice questions
Question 1
Which of the following commands can be used to lock a user’s account so that they cannot log into a Linux server without removing any files, folders, or data?
- A. lock
- B. usermod
- C. userdel
- D. chmod
Show answer and explanation ▾
Correct answer: B
The usermod command changes an existing account, and its lock option stops the user from logging in. Files, folders and data are left untouched.
Why the other options are wrong:
- A. There is no lock command that disables a user account in this way.
- C. userdel deletes the account, which goes beyond locking it.
- D. chmod changes file permissions, not account status.
Question 2
Which of the following technologies is supported by the majority of cloud providers in order to support the orchestration of containerized applications?
- A. Kubernetes
- B. Vagrant
- C. Ansible
- D. Terraform
Show answer and explanation ▾
Correct answer: A
Kubernetes is the orchestration platform for containerized applications and is supported by the major cloud providers.
Why the other options are wrong:
- B. Vagrant manages development virtual machines, not container orchestration.
- C. Ansible automates configuration and deployment but is not a container orchestrator.
- D. Terraform provisions infrastructure as code and is not an orchestrator for containers.
Question 3
An IT team is currently implementing a custom software platform to address some key needs of the company.
Which of the following is considered a functional requirement?
- A. Identifying the purpose of the proposed system
- B. Identifying the users of the proposed system
- C. Identifying the development methodology
- D. Identifying the technology stack of the proposed system
Show answer and explanation ▾
Correct answer: A
A functional requirement describes what a system must do, and identifying the purpose of the proposed system is the first statement of that. The other items describe people, process or tooling.
Why the other options are wrong:
- B. Identifying users is stakeholder analysis, not a functional requirement.
- C. The development methodology is a project choice, not a functional requirement.
- D. The technology stack is a technical constraint, not a functional requirement.
Question 4
A server on the network is unreachable.
What is the best method to verify connectivity between your computer and the remote server?
- A. lookup
- B. find
- C. ping
- D. netstat
Show answer and explanation ▾
Correct answer: C
ping sends ICMP echo requests to the remote host and shows whether replies come back, so it is the simplest way to check basic connectivity.
Why the other options are wrong:
- A. lookup is not a standard connectivity test.
- B. find searches for files and has nothing to do with network checks.
- D. netstat shows local connections and ports but does not test the path to a remote server.
Question 5
A company’s IT associate lists the contents of a directory and sees this line:
-rwsr-x--x 2 bob sales 2047 Oct 10 09:44 sales-report
What happens when Alice from the accounting team tries to execute this file?
- A. The script executes using Bob’s account.
- B. The script executes, but Alice cannot see the results.
- C. The script executes and Bob is notified.
- D. The script fails to execute; Alice is not on the sales team.
Show answer and explanation ▾
Correct answer: A
The s in the owner execute position is the setuid bit. When Alice runs the file, it runs with the permissions of its owner, Bob. The others bit has execute permission, so she can run it.
Why the other options are wrong:
- B. Setuid does not hide results from the person running the program.
- C. Linux does not notify the owner when a setuid file is run.
- D. Others have execute permission (x), so Alice does not need to be on the sales team.
Question 6
A software development team uses a single physical server for testing the latest code in multiple environments: development, pre-production, and production.
What is the recommended approach to maintain the basic security of these environments?
- A. Assign different developers on the team to work on test, pre-prod, and prod code.
- B. Implement peer review for all the changes deployed into any of the environments.
- C. Develop and deploy each environment with its own set of software tools.
- D. Use different user/group IDs for deploying and running workload in each environment.
Show answer and explanation ▾
Correct answer: D
When several environments share one physical server, running each under its own user and group IDs lets standard Linux file and process permissions keep them apart. A workload in one environment then cannot read or change the files and processes of another.
Why the other options are wrong:
- A. Splitting developers across environments is a staffing choice and does not isolate the workloads on the server.
- B. Peer review improves change quality but does not separate the environments at the operating system level.
- C. Separate tool sets do not stop one environment from accessing the files or processes of another.
Question 7
Which utility is used to create public and private key pairs for SSH authentication?
- A. adduser
- B. ssh-keygen
- C. keygen
- D. ssh
Show answer and explanation ▾
Correct answer: B
The ssh-keygen utility, part of OpenSSH, generates the public and private key pair used for SSH authentication. The public key is placed on the server and the private key stays with the user.
Why the other options are wrong:
- A. adduser creates user accounts, not SSH key pairs.
- C. keygen is not the standard OpenSSH utility for this task.
- D. ssh is the client that opens the remote session, it does not generate key pairs.
Question 8
What does LVM stand for?
- A. Logical Virtualization Manager
- B. Linux Volume Manager
- C. Logical Volume Manager
- D. Linux Virtualization Manager
Show answer and explanation ▾
Correct answer: C
LVM stands for Logical Volume Manager. It groups physical storage into volume groups and carves out logical volumes that can be resized more flexibly than fixed disk partitions.
Why the other options are wrong:
- A. LVM manages storage volumes, not virtualization.
- B. The first word is Logical, not Linux.
- D. LVM is neither named after Linux nor a virtualization manager.
Question 9
Encryption that uses both a private key and public key is known as what?
- A. Key Pair Encryption (symmetric cryptography)
- B. HMAC Cryptography (hash based message authentication)
- C. Public Key Cryptography (asymmetric cryptography)
- D. DPE (dual-phased hybrid encryption)
Show answer and explanation ▾
Correct answer: C
Public Key Cryptography, also called asymmetric cryptography, uses a mathematically linked key pair: a public key that can be shared openly and a private key that is kept secret. Data encrypted with one of the two can only be decrypted with the other.
Why the other options are wrong:
- A. Symmetric cryptography uses one shared secret key for both encryption and decryption.
- B. HMAC verifies message integrity and authenticity with a shared secret and a hash, it does not encrypt with a public and private key pair.
- D. DPE is not the name of the encryption that uses a public and private key pair.
Question 10
An IT associate would find the log files for syslog in which of the following directories?
- A. /var/log
- B. /usr/local/logs
- C. /home/logs
- D. /etc/logs
Show answer and explanation ▾
Correct answer: A
Linux systems write syslog output to files under /var/log, the standard directory for variable log data defined by the Filesystem Hierarchy Standard.
Why the other options are wrong:
- B. /usr/local/logs is not the standard location for syslog files.
- C. /home holds user home directories, not system logs.
- D. /etc holds configuration files, not log files.
Question 11
Which of the following deployment environments is accessed by customers/end-users in a live or real-time fashion?
- A. Production
- B. Runtime
- C. Staging
- D. Website
Show answer and explanation ▾
Correct answer: A
The production environment is the live system that customers and end users actually use. Code reaches it only after passing through earlier environments such as development and staging.
Why the other options are wrong:
- B. Runtime describes where code executes, it is not a deployment environment tier.
- C. Staging is a pre-release copy used for final testing, not the live environment for customers.
- D. Website is a type of application, not a deployment environment.
Question 12
Which port is normally required to be open for secure remote interactive shell access to Linux systems?
- A. 443/tcp
- B. 23/tcp
- C. 22/tcp
- D. 25/tcp
Show answer and explanation ▾
Correct answer: C
Secure remote shell access to Linux uses SSH, which listens on TCP port 22 by default. That port must be reachable for an interactive SSH session.
Why the other options are wrong:
- A. 443/tcp is used for HTTPS web traffic.
- B. 23/tcp is Telnet, which is not encrypted.
- D. 25/tcp is SMTP for mail transfer.
Question 13
What is the underlying technology that allows containers to be restricted to defined limits for system resource usage such as CPU, memory, and network bandwidth?
- A. climits
- B. UnionFS
- C. Namespaces
- D. cgroups
Show answer and explanation ▾
Correct answer: D
Control groups, or cgroups, are the Linux kernel feature that limits and accounts for the CPU, memory, I/O and network resources a group of processes may use. Container runtimes rely on them to enforce resource limits.
Why the other options are wrong:
- A. climits is not the kernel technology that limits container resources.
- B. UnionFS provides layered file systems for containers, not resource limits.
- C. Namespaces isolate what a container can see, such as processes and network interfaces, not how much it can use.
Question 14
Which option will cause ls to display hidden files and folders?
- A. ls -v
- B. ls -l
- C. ls -a
- D. ls -t
Show answer and explanation ▾
Correct answer: C
The -a option tells ls to list all entries, including those whose names begin with a dot, which are hidden by default.
Why the other options are wrong:
- A. ls -v sorts names by version number and does not show hidden entries.
- B. ls -l produces the long listing format and does not show hidden entries.
- D. ls -t sorts by modification time and does not show hidden entries.
Question 15
In which file are system and user account passwords stored?
- A. /etc/passwd
- B. /etc/login.defs
- C. /etc/shadow
- D. /etc/secure
Show answer and explanation ▾
Correct answer: C
Hashed account passwords are stored in /etc/shadow, which is readable only by root. It also holds password aging information for each account.
Why the other options are wrong:
- A. /etc/passwd holds account details such as UID, home directory and shell, with the password field pointing to the shadow file.
- B. /etc/login.defs holds defaults for account creation and password aging, not passwords.
- D. /etc/secure is not the standard file that stores account passwords.
Question 16
Which of these providers host repositories of container images?
- A. Docker Hub
- B. GitHub
- C. Container Index
- D. GitLab
Show answer and explanation ▾
Correct answer: A
Docker Hub is the registry service run by Docker that hosts public and private container repositories. Users pull ready-made containers from it and push their own builds to it.
Why the other options are wrong:
- B. GitHub is first and foremost a platform for hosting Git source code repositories.
- C. Container Index is not a provider of container repositories.
- D. GitLab is first and foremost a platform for hosting Git source code and running pipelines.
Question 17
What is an appropriate cost consideration when implementing serverless functions in the cloud?
- A. vCPU resources and disk cache
- B. Elapsed time of function execution and memory used
- C. Virtual machine configuration and memory allocation
- D. Runtime environment and container configuration
Show answer and explanation ▾
Correct answer: B
Serverless functions are billed on usage: the number of invocations, how long each execution runs and how much memory is allocated to it. There is no charge for idle servers.
Why the other options are wrong:
- A. vCPU resources and disk cache are sizing concerns for servers, not the billing basis for serverless functions.
- C. Virtual machine configuration is not managed or paid for directly with serverless functions.
- D. The runtime environment and container configuration are handled by the provider and are not the billing basis.
Question 18
Which of the following best describes open source compliance?
- A. A process by which software components are compiled in a development environment, pushed to staging, and then finally moved to production
- B. A process in which various users of open source software observe copyright notices and satisfy license obligations for their open source software components
- C. A process by which users of open source software evaluate each line of their code against an open source dictionary to determine which components have been plagiarized
- D. A process by which open source software is first initiated by a requirements analysis, followed by design and then implementation, with a final testing step
Show answer and explanation ▾
Correct answer: B
Open source compliance is the process by which users, integrators and developers of open source software observe copyright notices and satisfy the license obligations of the components they use.
Why the other options are wrong:
- A. This describes promoting software through deployment environments.
- C. Compliance is about meeting license obligations, not checking code against a dictionary for plagiarism.
- D. This describes a software development life cycle.
Question 19
What open source tool is used to manage instances in the cloud using infrastructure as code?
- A. SystemsDeployer
- B. Vault
- C. Terraform
- D. Docker
Show answer and explanation ▾
Correct answer: C
Terraform is an infrastructure as code tool that creates, changes and removes cloud resources such as instances from declarative configuration files.
Why the other options are wrong:
- A. SystemsDeployer is not an infrastructure as code tool for managing cloud instances.
- B. Vault manages secrets, not the provisioning of cloud instances.
- D. Docker builds and runs containers, it does not provision cloud instances from code.
Question 20
Which of the following is a commonly used open source software used to connect to SSL/TLS VPN services?
- A. OpenVPN
- B. GNUVPN
- C. NordVPN
- D. VPNConnect
Show answer and explanation ▾
Correct answer: A
OpenVPN is widely used open source software that builds VPN tunnels secured with SSL/TLS.
Why the other options are wrong:
- B. GNUVPN is not a commonly used SSL/TLS VPN client.
- C. NordVPN is a commercial VPN service, not open source software.
- D. VPNConnect is not a commonly used open source SSL/TLS VPN client.
Question 21
What does IaaS stand for?
- A. IT as a Service
- B. Integration as a Service
- C. Infrastructure as a Service
- D. Information as a Service
Show answer and explanation ▾
Correct answer: C
IaaS stands for Infrastructure as a Service. The provider supplies virtualized compute, storage and networking, and the customer manages the operating systems and applications on top.
Why the other options are wrong:
- A. IT as a Service is not what IaaS stands for.
- B. Integration as a Service is not what IaaS stands for.
- D. Information as a Service is not what IaaS stands for.
Question 22
Which is a common best practice to automatically reduce disk usage associated with the storage of log files?
- A. Use the logrotate utility to periodically rotate the log files.
- B. Create a cron job that deletes all log files in the folder every day.
- C. Delete the “/var/log” directory so the log files are prevented from being created.
- D. Manually empty the log files every day of the week.
Show answer and explanation ▾
Correct answer: A
The logrotate utility rotates, compresses and removes old log files on a schedule, which keeps disk usage under control without losing recent logs.
Why the other options are wrong:
- B. Deleting every log file each day destroys records needed for troubleshooting and auditing.
- C. Deleting /var/log breaks logging for the system and its services.
- D. Emptying log files by hand is not automatic and loses the log history.
Question 23
When using rsync to mirror a local directory to a remote server, what is the significance of the --delete option?
- A. Files absent from the remote directory will be restored from the local directory.
- B. Files present in the local directory, but not present in the remote directory, will be deleted.
- C. Files absent from the local directory will be restored from the remote directory.
- D. Files present in the remote directory, but not present in the local directory, will be deleted.
Show answer and explanation ▾
Correct answer: D
With --delete, rsync removes files on the receiving side that no longer exist on the sending side. When mirroring a local directory to a remote server, extra files on the remote directory are deleted so both sides match.
Why the other options are wrong:
- A. Copying missing files to the remote side is normal rsync behavior and does not depend on --delete.
- B. Files that exist locally but not remotely are copied to the remote side, not deleted.
- C. The option does not copy anything from the remote directory back to the local one.
Get the complete LFCA bank
These 23 questions are roughly 20% of the bank. The full pack has 117 real exam questions, each with the same depth of explanation, plus a questions-only PDF for timed practice and free updates forever.
View the full Linux Foundation LFCA question bank →
About the LFCA exam
These 23 Linux Foundation LFCA questions are free here, and as the free sample PDF.