101-500 Sample Questions & Answers
Working on the command line with GNU and Unix commands makes up well over a third of the exam, ahead of installation topics like a boot manager, hard disk layout, shared libraries, filesystem creation and maintenance, hardware settings, and runlevels.
Launch the full 101-500 simulator →Showing 10 of 20 free samples.
- Question 1
Which of the following properties of an existing file changes when a hard link pointing to that file is created?
Show answer & explanation
Correct answer: B
When a hard link is created, the link count of the file increases because the filesystem now has multiple directory entries pointing to the same inode. The link count tracks how many directory entries reference the same file data. The other properties remain unchanged: file size stays the same since it points to the same data, modify timestamp is not updated by link creation, inode number remains identical, and permissions are shared between all hard links.
- Question 2
Which program updates the database that is used by the locate command? (Specify ONLY the command without any path or parameters)
Show answer & explanation
Correct answer: A
The updatedb command updates the database used by the locate command. This database contains an index of all files on the system, making file searches with locate much faster than find. The updatedb command is typically run automatically via cron, but can be executed manually to refresh the database with recent file system changes. Only the command name updatedb is required without any path or parameters.
- Question 3
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)
Show answer & explanation
Correct answer: A
The file cmdline in the /proc filesystem contains the command line parameters that were passed from the bootloader to the kernel during system startup. This file shows the kernel boot parameters including root filesystem, init program, and various kernel options. The /proc filesystem provides a virtual interface to kernel information, and cmdline specifically shows the boot command line without any directory path.
- Question 4
What is contained on the EFI System Partition?
Show answer & explanation
Correct answer: B
The EFI System Partition (ESP) contains the first stage boot loader and other boot-related files for UEFI systems. This includes the UEFI boot loaders, boot manager files, and system firmware executables. The ESP is typically formatted with FAT32 and mounted at /boot/efi. The other options are incorrect: the kernel, device drivers, and system configuration files are stored elsewhere in the filesystem.
- Question 5
What is the maximum niceness value that a regular user can assign to a process with the nice command when executing a new process?
Show answer & explanation
Correct answer: C
Regular users can only assign niceness values from 0 to 19 when starting new processes with the nice command. The value 19 represents the lowest priority (most nice), while 0 is the default priority. Negative nice values (-20 to -1) provide higher priority but can only be set by the root user. This limitation prevents regular users from creating high-priority processes that could impact system performance.
- Question 6Select 2
Given the following two symbolic links in a System V init configuration:
/etc/rc 1 .d/K01 a pache2
/etc/rc2.d/S02apache2When are the scripts executed that are referenced by these links? (Choose two.)
Show answer & explanation
Correct answers: A, C
The S02apache2 script is executed when the system enters runlevel 2. In System V init, scripts beginning with S (Start) followed by a priority number are executed in ascending order when entering the specified runlevel. The number 02 indicates the execution order priority. Scripts in /etc/rc2.d/ are specifically for runlevel 2 operations. K scripts are for Kill/stop operations when leaving runlevels.
The K01apache2 script is executed when leaving runlevel 1, not when entering it. In System V init, K scripts (Kill) stop services when exiting a runlevel, while S scripts start services when entering a runlevel. The statement that K01apache2 is never run is incorrect - it runs when transitioning away from runlevel 1. The K prefix indicates stop/kill operations, not that the service is deactivated permanently.
- Question 7
Which is the default percentage of reserved space for the root user on new ext4 filesystems?
Show answer & explanation
Correct answer: E
By default, ext4 filesystems reserve 5% of the total space for the root user. This reserved space ensures that root can still write to the filesystem even when regular users have filled it to capacity, preventing system lockups. This reservation helps maintain system stability and allows root to perform critical operations like logging and temporary file creation. The percentage can be adjusted using tune2fs after filesystem creation.
- Question 8
What is the effect of the -v option for the grep command?
Show answer & explanation
Correct answer: C
The -v option for grep inverts the match, causing it to output only non-matching lines. This is the opposite of normal grep behavior, which shows lines that match the pattern. The -v option is useful for filtering out unwanted lines or finding lines that do not contain a specific pattern. For example, "grep -v error logfile" would show all lines except those containing the word "error".
- Question 9
In compliance with the FHS, in which of the directories are man pages found?
Show answer & explanation
Correct answer: C
According to the Filesystem Hierarchy Standard (FHS), manual pages are stored in /usr/share/man/. This directory contains subdirectories for different manual sections (man1 for user commands, man8 for system administration commands, etc.). The FHS specifies this location for architecture-independent data files that can be shared across systems. Other locations like /usr/man/ are legacy paths not compliant with current FHS standards.
- Question 10
Which of the following commands is used to change options and positional parameters within a running Bash shell?
Show answer & explanation
Correct answer: D
The set command is used to change shell options and positional parameters within a running Bash shell. It can enable or disable shell options using + or - prefixes, and can also set positional parameters (, , etc.). For example, "set -x" enables debug mode, "set +x" disables it, and "set -- arg1 arg2" sets positional parameters. This command modifies the behavior of the current shell session without requiring shell restart.
Ready for the real thing?
The full 101-500 simulator has every exam-style question, timed mode, and instant scoring.