The Linux Foundation Practice Exam, Exams of Technology

A broad-spectrum practice exam covering foundational open-source principles, governance models, community collaboration mechanisms, licensing, project lifecycle management, and ecosystem best practices. Candidates must understand the role of The Linux Foundation in supporting global open-source technologies across cloud, networking, security, AI/ML, embedded systems, and emerging industries. The exam includes topics such as open-source compliance, contribution etiquette, security disclosures, neutral governance, and multi-stakeholder coordination.

Typology: Exams

2025/2026

Available from 01/12/2026

shilpi-jain-1
shilpi-jain-1 🇮🇳

4.2

(5)

29K documents

1 / 76

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The Linux Foundation Practice Exam
Question 1. **Which command creates a new directory named “project” and any missing
parent directories?**
A) mkdir project
B) mkdir -p project
C) mkdir -a project
D) mkd project
Answer: B
Explanation: The `-p` flag tells `mkdir` to create parent directories as needed and not to error if
the directory already exists.
Question 2. **What does the command `ln -s /usr/bin/python3 /usr/local/bin/python` do?**
A) Creates a hard link named python pointing to python3
B) Creates a symbolic link named python pointing to python3
C) Copies python3 to /usr/local/bin/python
D) Moves python3 to /usr/local/bin/python
Answer: B
Explanation: The `-s` option creates a symbolic (soft) link.
Question 3. **Which of the following find expressions locates all regular files larger than 10 MiB
in /var/log?**
A) find /var/log -type f -size +10M
B) find /var/log -type f -size +10k
C) find /var/log -type d -size +10M
D) find /var/log -size +10M -type f
Answer: A
Explanation: `-type f` selects regular files; `-size +10M` selects files larger than 10 MiB.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c

Partial preview of the text

Download The Linux Foundation Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which command creates a new directory named “project” and any missing parent directories? A) mkdir project B) mkdir - p project C) mkdir - a project D) mkd project Answer: B Explanation: The -p flag tells mkdir to create parent directories as needed and not to error if the directory already exists. Question 2. What does the command ln - s /usr/bin/python3 /usr/local/bin/python do? A) Creates a hard link named python pointing to python B) Creates a symbolic link named python pointing to python C) Copies python3 to /usr/local/bin/python D) Moves python3 to /usr/local/bin/python Answer: B Explanation: The -s option creates a symbolic (soft) link. Question 3. Which of the following find expressions locates all regular files larger than 10 MiB in /var/log? A) find /var/log - type f - size +10M B) find /var/log - type f - size +10k C) find /var/log - type d - size +10M D) find /var/log - size +10M - type f Answer: A Explanation: -type f selects regular files; -size +10M selects files larger than 10 MiB.

Question 4. To display the permissions of a file in symbolic form, which option is used with ls? A) ls - l B) ls - a C) ls - h D) ls - R Answer: A Explanation: ls - l shows long format output, including symbolic permissions (rwx). Question 5. What effect does setting the set‑uid bit on an executable have? A) The program runs with the permissions of its owner B) The program runs with the permissions of the invoking user C) The program cannot be executed by non‑root users D) The program’s group ID is ignored Answer: A Explanation: The set‑uid bit makes the process run with the file owner’s UID. Question 6. Which grep option enables the use of extended regular expressions? A) - E B) - F C) - G D) - P Answer: A Explanation: -E tells grep to interpret the pattern as an extended regular expression. Question 7. What does the command diff - u file1 file2 produce?

Question 10. Which pipeline correctly counts the number of lines containing the word “error” in syslog? A) grep error /var/log/syslog | wc - l B) wc - l /var/log/syslog | grep error C) cat /var/log/syslog | grep - c error D) grep - c error /var/log/syslog | wc - l Answer: A Explanation: grep filters matching lines; wc - l counts them. Question 11. What does the command tar - czf backup.tar.gz /home/user do? A) Creates a gzip‑compressed tar archive of /home/user named backup.tar.gz B) Extracts backup.tar.gz into /home/user C) Lists contents of backup.tar.gz D) Creates an uncompressed tar archive named backup.tar.gz Answer: A Explanation: -c creates, -z compresses with gzip, -f specifies the filename. Question 12. Which command decompresses a bzip2‑compressed file “data.bz2” to standard output? A) bzip2 - d data.bz B) bunzip2 - c data.bz C) bzcat data.bz D) Both B and C are correct Answer: D Explanation: bunzip2 - c and bzcat both output decompressed data to stdout.

Question 13. In Git, which command stages all modified and deleted files for the next commit? A) git add. B) git commit - a C) git stage - A D) git add - u Answer: D Explanation: git add - u stages modifications and deletions (but not new files). Question 14. How can you view the details of an SSL certificate stored in PEM format named “server.crt”? A) openssl x509 - in server.crt - text - noout B) openssl req - in server.crt - text - noout C) cat server.crt | openssl x509 - text - noout D) Both A and C are correct Answer: D Explanation: Both commands read the PEM file and display its contents. Question 15. Which systemd command will display the status of the “nginx” service? A) systemctl status nginx.service B) service nginx status C) systemctl show nginx D) systemctl info nginx.service Answer: A Explanation: systemctl status shows detailed status information. Question 16. To enable a service to start automatically at boot, which command is used?

A) renice +10 - p 1234 B) nice - n +10 1234 C) kill - 10 1234 D) renice - p 1234 + Answer: A Explanation: renice adjusts the scheduling priority of an existing process; +10 makes it less favorable. Question 20. Which tool provides a real‑time view of CPU, memory, and process usage? A) top B) ps aux C) vmstat D) iostat Answer: A Explanation: top updates continuously and displays resource usage. Question 21. How would you schedule a script /usr/local/bin/backup.sh to run daily at 02: using cron? A) 30 2 * * * /usr/local/bin/backup.sh B) 2 30 * * * /usr/local/bin/backup.sh C) @daily /usr/local/bin/backup.sh D) 0 2 * * * /usr/local/bin/backup.sh Answer: A Explanation: Cron fields are minute hour day month weekday; “30 2” means 02:30. Question 22. Which command installs the package “htop” on a system using the DNF package manager?

A) dnf install htop B) yum add htop C) apt-get install htop D) zypper in htop Answer: A Explanation: dnf install is the correct syntax for DNF. Question 23. To make a sysctl parameter change persistent across reboots, where should it be added? A) /etc/sysctl.conf B) /etc/sysctl.d/99-custom.conf C) Both A and B are valid locations D) /proc/sys/kernel/… directly Answer: C Explanation: Parameters can be placed in /etc/sysctl.conf or any file under /etc/sysctl.d/. Question 24. Which command unloads the kernel module “vboxdrv”? A) modprobe - r vboxdrv B) rmmod vboxdrv C) insmod - r vboxdrv D) Both A and B are correct Answer: D Explanation: Both modprobe - r and rmmod remove a loaded module. Question 25. What does the Docker command docker run - d --name web nginx do? A) Starts a detached container named “web” from the nginx image

D) Export all variables to the environment Answer: A Explanation: -e (errexit) causes the script to terminate on command failure. Question 29. Which command assigns the static IPv4 address 192.168.10.20/24 to interface eth0 on a system using ip? A) ip addr add 192.168.10.20/24 dev eth B) ifconfig eth0 192.168.10.20 netmask 255.255.255.0 up C) ip link set eth0 address 192.168.10.20/ D) route add - net 192.168.10.20/24 dev eth Answer: A Explanation: ip addr add assigns an address to an interface. Question 30. How do you permanently set the system hostname to “web01” on a system using hostnamectl? A) hostnamectl set-hostname web B) echo web01 > /etc/hostname C) sysctl kernel.hostname=web D) hostname web Answer: A Explanation: hostnamectl set-hostname updates /etc/hostname and related DBus settings. Question 31. Which file is consulted first when resolving a hostname to an IP address? A) /etc/hosts B) /etc/resolv.conf C) /etc/nsswitch.conf D) /etc/hostname

Answer: A Explanation: The hosts file is consulted before DNS according to the default hosts entry in nsswitch. Question 32. To add a default route via gateway 10.0.0.1 using ip route, which command is correct? A) ip route add default via 10.0.0. B) ip route add 0.0.0.0/0 dev 10.0.0. C) route add default gw 10.0.0.1 eth D) ip route set default gw 10.0.0. Answer: A Explanation: default is a shortcut for 0.0.0.0/0. Question 33. What does the Linux bonding mode “active‑backup” provide? A) Load balancing across all slaves B) Failover to a backup interface if the active one fails C) Aggregation of bandwidth with LACP D) Round‑robin packet distribution Answer: B Explanation: Active‑backup keeps one interface active; others standby for redundancy. Question 34. Which SSH configuration directive disables password authentication? A) PasswordAuthentication no B) PermitRootLogin no C) PubkeyAuthentication yes D) UsePAM no Answer: A

Explanation: The rule matches source addresses in that subnet, increments a counter, then drops them. Question 38. Which Nginx directive is used to proxy HTTP requests to an upstream server at 127.0.0.1:8080? A) proxy_pass http://127.0.0.1:8080; B) upstream 127.0.0.1:8080; C) location / { proxy http://127.0.0.1:8080; } D) redirect http://127.0.0.1:8080; Answer: A Explanation: proxy_pass forwards matching requests to the specified upstream. Question 39. To synchronize system time with remote NTP servers using chrony, which service must be active? A) chronyd.service B) ntpd.service C) timesyncd.service D) systemd-timesyncd.service Answer: A Explanation: chronyd is the daemon for the chrony suite. Question 40. Which command creates a new GPT partition table on /dev/sdb? A) gdisk /dev/sdb B) fdisk - g /dev/sdb C) partprobe /dev/sdb D) mkfs.gpt /dev/sdb Answer: A

Explanation: gdisk (GPT fdisk) initializes and edits GPT tables. Question 41. To format a partition /dev/sdc1 with the XFS filesystem, which command is correct? A) mkfs.xfs /dev/sdc B) mkfs - t xfs /dev/sdc C) format.xfs /dev/sdc D) xfs_mkfs /dev/sdc Answer: A Explanation: mkfs.xfs creates an XFS filesystem. Question 42. Which entry in /etc/fstab ensures that /dev/sdd1 is mounted at /data with the ext4 filesystem using its UUID? A) UUID=xxxx-xxxx /data ext4 defaults 0 2 B) /dev/sdd1 /data ext4 defaults 0 2 C) /dev/sdd1 /data ext4 noauto 0 0 D) UUID=xxxx-xxxx /data ext4 ro 0 1 Answer: A Explanation: Using the UUID guarantees correct device identification; defaults provides standard options. Question 43. What is the purpose of the command pvcreate /dev/sde in LVM? A) Initializes /dev/sde as a physical volume for LVM use B) Creates a volume group named sde C) Formats /dev/sde with ext D) Mounts /dev/sde at /pv Answer: A

Question 47. What does the fsck - y /dev/sdf1 command do? A) Checks the filesystem and automatically answers “yes” to repair prompts B) Formats /dev/sdf1 with the default filesystem C) Mounts /dev/sdf1 read‑only D) Displays the filesystem superblock information Answer: A Explanation: -y forces automatic fixing of detected problems. Question 48. To add a new local user “alice” with a home directory and default shell /bin/bash, which command is appropriate? A) useradd - m - s /bin/bash alice B) adduser alice --create-home --shell /bin/bash C) useradd alice - d /home/alice - s /bin/bash D) Both A and C are correct Answer: D Explanation: Both -m (create home) and specifying -d achieve the same result. Question 49. Which file defines password aging policies such as maximum days and warning period? A) /etc/login.defs B) /etc/shadow C) /etc/pam.d/common‑password D) /etc/passwd Answer: B Explanation: /etc/shadow stores fields for last change, min, max, warning, etc.

Question 50. How would you grant user “bob” the ability to run any command via sudo without a password? A) echo "bob ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/bob B) visudo and add “bob ALL=(ALL) ALL” C) usermod - aG sudo bob D) chmod u+s /usr/bin/sudo Answer: A Explanation: Adding a file in /etc/sudoers.d/ with the NOPASSWD tag gives password‑less sudo. Question 51. Which command sets the maximum number of open files for the current shell to 4096? A) ulimit - n 4096 B) sysctl - w fs.file-max= C) echo 4096 > /proc/sys/fs/file-max D) setrlimit - n 4096 Answer: A Explanation: ulimit - n controls the soft limit for open file descriptors. Question 52. In SELinux, which mode logs denials but does not enforce policies? A) Enforcing B) Permissive C) Disabled D) Targeted Answer: B Explanation: Permissive mode records AVC denials without blocking actions.

A) systemctl set-default graphical.target B) systemctl isolate graphical.target C) systemctl enable graphical.target D) systemctl start graphical.target Answer: A Explanation: set-default defines the target used on boot. Question 57. Which of the following commands disables the firewalld service permanently? A) systemctl disable --now firewalld B) systemctl stop firewalld && systemctl mask firewalld C) systemctl disable firewalld D) Both B and C are needed for permanent disable Answer: D Explanation: disable prevents start at boot; mask blocks manual start. Question 58. What does the systemd-analyze blame command display? A) Time taken by each service during boot B) Total boot time in seconds C) List of failed units D) Dependency tree of units Answer: A Explanation: blame sorts services by their initialization duration. Question 59. Which option to tar extracts files while preserving original permissions and timestamps? A) tar - xpf archive.tar

B) tar - xvf archive.tar --preserve-permissions C) tar - xpf archive.tar --same-owner D) Both A and C together achieve the goal Answer: D Explanation: -p preserves permissions; --same-owner keeps ownership when run as root. Question 60. To view the differences between two directories recursively, which command is appropriate? A) diff - r dir1 dir B) rsync - nav dir1/ dir2/ C) cmp - r dir1 dir D) comm - 3 dir1 dir Answer: A Explanation: diff - r compares directory trees recursively. Question 61. Which command permanently adds the environment variable JAVA_HOME=/opt/java for all users? A) echo "JAVA_HOME=/opt/java" >> /etc/environment B) export JAVA_HOME=/opt/java in /etc/profile.d/java.sh C) setenv JAVA_HOME /opt/java in /etc/profile D) Both A and B are acceptable methods Answer: D Explanation: Adding to /etc/environment or creating a script in /etc/profile.d/ both affect all users. Question 62. In a Bash script, what does the construct [[ $var =~ ^[0-9]+$ ]] test? A) Whether $var contains only digits