Docsity

Linux Essentials Comprehensive Final Practice Examination 2026.pdf, Exams of Computer Applications

Toggle sidebar
bg1
Linux Essentials Comprehensive Final Practice Examination 2026/2027 | Original Practice Questions, Answers and Detailed Rationales | LinuxFundamentals, Command-Line Operations, Filesystem Management, User Administration, File Permissions, Shell Scripting, Process Management,Networking and System Security | University-Level and Professional Certification Exam Preparation GuideQuestion 1A system administrator needs to verify which kernel version is currently running on a production server. Which command would provide this information?A. uname -rB. kernel --versionC. lsversionD. sysinfo -k
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

Partial preview of the text

Download Linux Essentials Comprehensive Final Practice Examination 2026.pdf and more Exams Computer Applications in PDF only on Docsity!

Linux Essentials Comprehensive Final Practice

Examination 2026/2027 | Original Practice

Questions, Answers and Detailed Rationales | Linux

Fundamentals, Command-Line Operations,

Filesystem Management, User Administration, File

Permissions, Shell Scripting, Process Management,

Networking and System Security | University-Level

and Professional Certification Exam Preparation

Guide

Question 1

A system administrator needs to verify which kernel version is currently running on a production server. Which command would provide this information?

A. uname -r

B. kernel --version

C. lsversion

D. sysinfo -k

Correct Answer: A

Explanation: The uname -r command displays the kernel release version. The -r flag specifically shows kernel release information, essential for compatibility checks.

Question 2

During a security audit, an administrator discovers a file with permissions set to 777. What does this permission level indicate?

A. Only the owner can read, write, and execute

B. All users have full read, write, and execute access

C. The file is encrypted and inaccessible

D. Only root can access the file

Correct Answer: B

Explanation: Permission 777 grants read (4), write (2), and execute (1) to owner, group, and others. This is a significant security risk in most environments.

Question 3

A developer needs to create a compressed archive of the /home/projects directory while preserving file permissions. Which command accomplishes this task?

A. zip -r projects.zip /home/projects

B. tar -czvf projects.tar.gz /home/projects

C. gzip /home/projects

C. search /var -bigger 100M

D. grep /var -size +100M

Correct Answer: A

Explanation: The find command with -size +100M locates files exceeding 100 megabytes. The plus sign indicates "greater than" the specified size.

Question 6

When configuring a new user account, which file should be modified to set default password aging policies for all future users?

A. /etc/passwd

B. /etc/shadow

C. /etc/login.defs

D. /etc/security/passwd

Correct Answer: C

Explanation: The /etc/login.defs file contains system-wide default settings for user account creation, including password aging parameters like PASS_MAX_DAYS and PASS_MIN_DAYS.

Question 7

A systems administrator needs to schedule a script to run every Monday at 3:00 AM. Which crontab entry accomplishes this?

A. 0 3 * * 1 /path/to/script.sh

B. 3 0 * * 1 /path/to/script.sh

C. 1 3 * * 0 /path/to/script.sh

D. * 3 * * Mon /path/to/script.sh

Correct Answer: A

Explanation: Crontab format is minute (0), hour (3), day (), month (), weekday (1=Monday). The entry 0 3 * * 1 runs at 3:00 AM every Monday.

Question 8

During troubleshooting, an administrator discovers that a service fails to start automatically after reboot. Which command should be used to enable the service?

A. service start

B. systemctl enable

C. chkconfig on

D. init enable

Correct Answer: B

Explanation: On systemd-based systems, systemctl enable creates symbolic links ensuring the service starts at boot. This is the modern standard for service management.

Question 9

A user reports they cannot execute a script they just created. Investigation shows permissions are -rw-r--r--. What command resolves this issue?

A. /usr

B. /var

C. /tmp

D. /opt

Correct Answer: B

Explanation: The /var directory holds variable data like logs, spools, and temporary files that change in size and content during normal system operation.

Question 12

A security administrator needs to verify which users have sudo privileges. Which file should be examined?

A. /etc/passwd

B. /etc/groups

C. /etc/sudoers

D. /etc/security/access.conf

Correct Answer: C

Explanation: The /etc/sudoers file defines which users and groups can execute commands with elevated privileges. It should be edited using visudo to prevent syntax errors.

Question 13

An administrator needs to copy a directory recursively while preserving all file attributes. Which command is most appropriate?

A. cp -r /source /destination

B. cp -a /source /destination

C. copy -recursive /source /destination

D. rsync -v /source /destination

Correct Answer: B

Explanation: The cp -a (archive) option preserves permissions, ownership, timestamps, and copies recursively. This is ideal for backup operations requiring attribute retention.

Question 14

What is the primary purpose of the /etc/fstab file?

A. Store firewall rules

B. Define filesystem mount points at boot

C. Configure network interfaces

D. List installed packages

Correct Answer: B

Explanation: The /etc/fstab file contains static information about filesystems, defining mount points, filesystem types, and mount options applied during system boot.

Question 15

An administrator needs to change the ownership of /var/www/html to user "webadmin" and group "www-data" recursively. Which command is correct?

A. chown -R webadmin:www-data /var/www/html

B. chown webadmin.www-data /var/www/html

C. chgrp -R webadmin:www-data /var/www/html

D. chmod -R webadmin:www-data /var/www/html

Correct Answer: A

Explanation: The chown -R user:group syntax changes ownership recursively. The colon separates user and group, and -R applies changes to all contents.

Question 18

Which command displays the amount of disk space used by directories in a human-readable format?

A. df -h

B. du -h

C. disk -human

D. space -r

Correct Answer: B

Explanation: The du -h command estimates file space usage with human-readable output (KB, MB, GB). The df command shows filesystem usage, not directory-specific usage.

Question 19

A developer needs to create a symbolic link named "current" pointing to "/opt/app/v2.1". Which command is correct?

A. ln -s /opt/app/v2.1 current

B. ln /opt/app/v2.1 current

C. link -symbolic current /opt/app/v2.

D. symlink /opt/app/v2.1 current

Correct Answer: A

Explanation: The ln -s target linkname creates a symbolic link. The -s flag specifies soft/symbolic link, with target first and link name second.

Question 20

During system startup, which process is the first to run after the kernel initializes?

A. bash

B. init or systemd

C. login

D. getty

Correct Answer: B

Explanation: After kernel initialization, init (SysV) or systemd (modern systems) starts as PID 1, responsible for initializing system services and managing processes.

Question 21

A user wants to run a command in the background and continue using the terminal. Which character should be appended to the command?

A. &

B.

C. @

D. %

Correct Answer: A

Explanation: Appending & to a command runs it in the background, returning the prompt immediately. The shell displays the job number and PID for management.

Question 24

Which file contains the list of filesystems that should NOT be checked by fsck during boot?

A. /etc/fstab

B. /etc/mtab

C. /etc/fsck.conf

D. /forcefsck

Correct Answer: A

Explanation: The /etc/fstab file's sixth field (pass) determines fsck order. A value of 0 means the filesystem should not be checked during boot.

Question 25

An administrator needs to identify which process is listening on TCP port 22. Which command provides this information?

A. netstat -tlnp | grep :

B. ps aux | grep 22

C. lsof -p 22

D. port -check 22

Correct Answer: A

Explanation: The netstat -tlnp command shows TCP (-t) listening (-l) ports numerically (-n) with process information (-p). Grep filters for port 22.

Question 26

What is the purpose of the /etc/hosts file?

A. Configure DNS servers

B. Map hostnames to IP addresses locally

C. Store network interface configurations

D. Define firewall rules

Correct Answer: B

Explanation: The /etc/hosts file provides static hostname-to-IP mappings, checked before DNS queries. It's useful for local overrides and small networks.

Question 27

Question 29

What information does the command id display when run without arguments?

A. Current user's UID, GID, and groups

B. System hostname and IP

C. Kernel version and architecture

D. Logged-in users list

Correct Answer: A

Explanation: The id command shows the current user's user ID (UID), primary group ID (GID), and supplementary groups, useful for permission troubleshooting.

Question 30

Which directory contains device files representing hardware components?

A. /bin

B. /dev

C. /proc

D. /sys

Correct Answer: B

Explanation: The /dev directory contains device files (block and character devices) that provide interfaces to hardware like disks, terminals, and printers.

Question 31

A systems administrator needs to compress a large log file to save disk space while keeping the original file. Which command accomplishes this?

A. gzip -k logfile.log

B. gzip logfile.log

C. compress logfile.log

D. zip logfile.log

Correct Answer: A

Explanation: The gzip -k (keep) option compresses the file while preserving the original. Without -k, gzip replaces the original with the compressed version.

Question 32

What is the significance of the sticky bit on a directory?

A. Files can only be deleted by their owners

B. The directory is read-only

C. Files are automatically compressed

D. The directory syncs to remote servers

Correct Answer: A

Explanation: The sticky bit (chmod +t) on a directory restricts file deletion to the file owner, directory owner, or root. Common on /tmp to prevent users deleting others' files.

Question 35

What does the ps -ef command display?

A. Only processes owned by the current user

B. All processes in full format

C. Only system processes

D. Processes sorted by memory usage

Correct Answer: B

Explanation: The ps -ef command shows all processes (-e) in full format (-f), including UID, PID, PPID, start time, and command. The -f provides detailed information.

Question 36

A file has permissions -rwxr-x---. Which statement is true?

A. Owner can read/write/execute; group can read/execute; others have no access

B. Everyone can read, but only owner can write

C. Owner and group have full access; others can read

D. Only owner has any access

Correct Answer: A

Explanation: The permission string shows owner (rwx), group (r-x), others (---). Group members can read and execute but not write; others have no permissions.

Question 37

An administrator needs to check available disk space on all mounted filesystems. Which command is correct?

A. df -h

B. du -h

C. free -h

D. mount -h

Correct Answer: A

Explanation: The df -h command displays disk space usage for all mounted filesystems in human-readable format. The du command shows directory usage, not filesystem capacity.

Question 38

What is the purpose of the grep -i option?

A. Invert the match

B. Case-insensitive search

C. Include line numbers

D. Ignore binary files

Correct Answer: B

Explanation: The -i flag makes grep case-insensitive, matching both uppercase and lowercase characters. This is useful when case may vary in the search target.