All Linux Foundation / CNCF exams

Free LFCA practice test: 30 questions with answers

30 original questions for Linux Foundation Certified IT Associate, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.

Free questions
30
Full bank
100 questions

LFCA exam guide: topics, cost and format

All 30 LFCA questions with answers

The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.

Linux fundamentals (5 questions)

  1. Question 1

    Which component of a Linux system is responsible for managing hardware resources and providing services to applications?

    1. AThe desktop environment
    2. BThe kernel
    3. CThe shell only
    4. DThe web browser
    Show answer and explanation
    Correct answer: B

    The kernel manages hardware and provides system services. The shell is an interface, the desktop environment is a user interface, and the browser is an application.

  2. Question 2

    Which command displays the current working directory?

    1. Apwd
    2. Bls
    3. Ccd
    4. Dcat
    Show answer and explanation
    Correct answer: A

    pwd prints the working directory. ls lists files, cd changes directories, and cat displays content.

  3. Question 3

    A user wants to know which version of the Linux kernel is running. Which command shows it?

    1. Adf -h
    2. Btop
    3. Cwhoami
    4. Duname -r
    Show answer and explanation
    Correct answer: D

    uname -r shows the running kernel release. whoami shows the user, df reports disk space, and top shows processes.

  4. Question 4

    In Linux file permissions, what does the execute bit mean for a directory?

    1. AThe directory is hidden
    2. BThe directory is encrypted
    3. CThe user can enter the directory and access files within it, given the other permissions
    4. DThe directory can be executed as a program
    Show answer and explanation
    Correct answer: C

    For directories, execute allows traversal into the directory. Directories are not executed as programs, and the bit does not hide or encrypt them.

  5. Question 5

    Which file contains the list of user accounts on a typical Linux system?

    1. A/etc/issue
    2. B/etc/hosts
    3. C/etc/passwd
    4. D/etc/fstab
    Show answer and explanation
    Correct answer: C

    /etc/passwd lists user account entries. hosts maps names to IPs, fstab lists mounts, and issue holds a login banner.

Cloud and containers (5 questions)

  1. Question 6

    A team wants to package an application and its dependencies so that it runs the same way on any host with a container engine. Which technology provides this?

    1. ASpreadsheets
    2. BContainers
    3. CVirtual desktops
    4. DBare metal installs only
    Show answer and explanation
    Correct answer: B

    Containers package applications with dependencies for consistent execution. Virtual desktops, spreadsheets and bare-metal installs do not provide this packaging model.

  2. Question 7

    In cloud computing, which model provides virtual machines and storage that the customer manages, including the operating system?

    1. ADesktop as a Service only
    2. BFunction as a Service only
    3. CSoftware as a Service
    4. DInfrastructure as a Service
    Show answer and explanation
    Correct answer: D

    IaaS gives customers VMs and storage they manage including the OS. SaaS provides finished applications, FaaS runs functions, and DaaS delivers desktops.

  3. Question 8

    An organization wants to scale containerized applications automatically across many hosts with health management. Which platform is commonly used?

    1. AKubernetes
    2. BA text editor
    3. CA single desktop computer
    4. DAn email client
    Show answer and explanation
    Correct answer: A

    Kubernetes orchestrates containers at scale with health management and scaling. Desktops, editors and email clients do not orchestrate containers.

  4. Question 9

    A container image is built from a file describing its steps. Which file is commonly used for this purpose?

    1. ALICENSE
    2. BREADME.md
    3. C/etc/hosts
    4. DDockerfile or Containerfile
    Show answer and explanation
    Correct answer: D

    Dockerfile or Containerfile describe image build steps. README, LICENSE and hosts files do not define image builds.

  5. Question 10

    Which THREE are typical characteristics of containers compared with virtual machines? (Choose three.)

    1. AContainers share the host kernel
    2. BContainers cannot be scaled horizontally
    3. CContainers always include their own complete kernel
    4. DContainers typically start faster than full virtual machines
    5. EContainers package application dependencies without a full guest operating system
    Show answer and explanation
    Correct answer: A, D, E

    Containers share the host kernel, start quickly and package dependencies without a full guest OS. They include no separate kernel and can scale horizontally.

Networking (5 questions)

  1. Question 11

    Which protocol translates human-readable domain names into IP addresses?

    1. ASSH
    2. BHTTP
    3. CSMTP
    4. DDNS
    Show answer and explanation
    Correct answer: D

    DNS resolves domain names to IP addresses. HTTP serves web content, SMTP sends email, and SSH provides secure remote access.

  2. Question 12

    A system must obtain an IP address automatically when it joins a network. Which service provides this?

    1. ADHCP
    2. BNTP
    3. CDNS
    4. DSNMP
    Show answer and explanation
    Correct answer: A

    DHCP assigns IP addresses and related settings automatically. DNS resolves names, NTP synchronizes time, and SNMP monitors devices.

  3. Question 13

    A network administrator needs to check whether a remote host is reachable with ICMP echo requests. Which command is used?

    1. Ascp
    2. Bchmod
    3. Cping
    4. Dtar
    Show answer and explanation
    Correct answer: C

    ping sends ICMP echo requests to test reachability. scp copies files, tar archives files, and chmod changes permissions.

  4. Question 14

    A firewall policy must allow SSH from a single administrative subnet and block SSH from all other networks. Which principle does this apply?

    1. ALeast privilege for network access
    2. BShared credentials
    3. COpen access by default
    4. DAnonymous access
    Show answer and explanation
    Correct answer: A

    Limiting SSH to a single admin subnet applies least privilege for network access. Open defaults, anonymous access and shared credentials are contrary to the principle.

  5. Question 15

    Which TWO are benefits of using encrypted protocols such as SSH and HTTPS? (Choose two.)

    1. ARemoval of the need for authentication
    2. BGuaranteed speed improvement in every case
    3. CConfidentiality of data in transit
    4. DProtection against tampering in transit
    5. EAutomatic disabling of firewalls
    Show answer and explanation
    Correct answer: C, D

    Encryption protects confidentiality and integrity in transit. It does not guarantee speed, remove authentication, or disable firewalls.

Operating systems (5 questions)

  1. Question 16

    Which Linux distribution family is based on Red Hat Enterprise Linux and uses the RPM package format?

    1. AAlpine Linux only
    2. BDebian-based systems only
    3. CFedora-based systems such as RHEL, Rocky Linux, or AlmaLinux
    4. DArch Linux only
    Show answer and explanation
    Correct answer: C

    RHEL-family distributions such as Rocky and AlmaLinux use RPM packages. Debian and Arch use other formats, and Alpine uses APK.

  2. Question 17

    A system administrator needs to install a package on a Debian-based system. Which package manager should be used?

    1. Adnf
    2. Bzypper
    3. Capt
    4. Dpacman
    Show answer and explanation
    Correct answer: C

    apt manages Debian-based packages. dnf is for Red Hat-family systems, zypper is for SUSE, and pacman is for Arch.

  3. Question 18

    Which init or service manager is standard on most modern Linux distributions?

    1. Axinetd
    2. Bcron
    3. Csysvinit only
    4. Dsystemd
    Show answer and explanation
    Correct answer: D

    systemd is standard on most modern distributions for service management. cron is for scheduled jobs, sysvinit is legacy, and xinetd is an older super-server.

  4. Question 19

    A system must start a service automatically at boot on a systemd system. Which command achieves this?

    1. Asystemctl enable servicename
    2. Bkill servicename
    3. Csystemctl status servicename only
    4. Dls servicename
    Show answer and explanation
    Correct answer: A

    systemctl enable configures a service to start at boot. Status shows state, kill sends signals, and ls lists files.

  5. Question 20

    Which mount point typically holds the operating system's configuration files?

    1. A/home
    2. B/etc
    3. C/tmp
    4. D/mnt
    Show answer and explanation
    Correct answer: B

    /etc holds system configuration. /home holds user data, /tmp holds temporary files, and /mnt is for mounting temporary file systems.

Security (5 questions)

  1. Question 21

    A user must create a strong password for a Linux account. Which guidance is most appropriate?

    1. AUse a long passphrase that is unique and not reused across accounts
    2. BUse the username as the password
    3. CUse a password shared with the team
    4. DUse a common word with a number at the end
    Show answer and explanation
    Correct answer: A

    Long, unique passphrases resist guessing and reuse risk. Usernames, shared passwords and simple common words are weak.

  2. Question 22

    A Linux administrator wants to disable direct root logins over SSH to reduce risk. Which setting does this?

    1. APort 22 only
    2. BPasswordAuthentication yes for root
    3. CAllowUsers root
    4. DPermitRootLogin no in the SSH daemon configuration
    Show answer and explanation
    Correct answer: D

    PermitRootLogin no disables direct root SSH login. Password settings, ports and allowing root do not disable direct root access.

  3. Question 23

    A security team wants to know which software packages have known vulnerabilities on a server. Which practice helps?

    1. AAssume all packages are safe because they are installed
    2. BCheck only the desktop wallpaper
    3. CUse the package manager's security update information and a vulnerability scanner
    4. DDisable updates to avoid breakage
    Show answer and explanation
    Correct answer: C

    Package security information and scanners identify known vulnerabilities. Assumptions, wallpapers and disabled updates do not identify or fix known issues.

  4. Question 24

    A file on a shared server must be readable by a group and writable only by its owner. Which permission set matches this requirement?

    1. A444 for everyone
    2. B777 for everyone
    3. C640 with the group set appropriately
    4. D600 with no group read
    Show answer and explanation
    Correct answer: C

    640 gives owner read and write, and group read. 777 gives everyone write, 600 removes group read, and 444 gives no write to owner.

  5. Question 25

    Which TWO are good practices for managing user accounts on a shared Linux server? (Choose two.)

    1. AKeep old accounts enabled as backups
    2. BGive every user root privileges to avoid permission issues
    3. CShare the root password in the team wiki
    4. DUse individual accounts instead of sharing one login
    5. ERemove or lock accounts when people leave the organization
    Show answer and explanation
    Correct answer: D, E

    Individual accounts and removing departed users' access are sound. Universal root, retained accounts and wiki-shared passwords are unsafe.

DevOps and IT operations (5 questions)

  1. Question 26

    A team wants every change to infrastructure to be tracked, reviewed, and reversible. Which practice supports this?

    1. APosting the changed settings in a team chat channel
    2. BMaking changes directly on live servers without records
    3. CKeeping the configuration in memory with no persisted copy on disk
    4. DInfrastructure as code stored in version control with reviews
    Show answer and explanation
    Correct answer: D

    Infrastructure as code in version control with review provides traceability and rollback. Direct server changes, memory-only configuration and chat sharing lack records.

  2. Question 27

    A continuous integration system automatically builds and tests code after each commit. Which benefit does this provide?

    1. AGuaranteed deployment to production
    2. BEarly detection of defects
    3. CRemoval of the need for testing
    4. DElimination of version control
    Show answer and explanation
    Correct answer: B

    CI detects defects early with automated builds and tests. It does not remove testing, guarantee production deployment, or replace version control.

  3. Question 28

    A deployment pipeline must install an application in staging before production. Which practice describes this sequence?

    1. APromoting the same tested artifact through environments
    2. BCopying files manually between servers
    3. CBuilding a new artifact for each environment without testing
    4. DDeploying directly to production first
    Show answer and explanation
    Correct answer: A

    Promoting the same tested artifact ensures consistency. Separate untested builds, production-first deployment and manual copies introduce risk.

  4. Question 29

    An operations team wants to be alerted when CPU usage on a server stays above 90 percent for ten minutes. Which tool category provides this?

    1. ASpreadsheet calculation
    2. BWord processing
    3. CImage editing
    4. DMonitoring and alerting
    Show answer and explanation
    Correct answer: D

    Monitoring systems collect metrics and trigger alerts on thresholds. Word processing, image editing and spreadsheets do not.

  5. Question 30

    A system's logs are collected from many servers into one place so that they can be searched during an incident. Which practice is this?

    1. ADeleting logs weekly
    2. BLogging disabled for performance
    3. CCentralized logging
    4. DLocal-only logging
    Show answer and explanation
    Correct answer: C

    Centralized logging collects logs for search and correlation. Local-only logs, weekly deletion and disabled logging limit investigation.