{"id":18638,"date":"2026-09-22T08:57:49","date_gmt":"2026-09-22T08:57:49","guid":{"rendered":"https:\/\/www.examlabs.com\/certification\/?p=18638"},"modified":"2026-09-22T08:57:49","modified_gmt":"2026-09-22T08:57:49","slug":"lpi-101-500-practice-test-questions-and-exam-dumps-part-17-q321-340","status":"publish","type":"post","link":"https:\/\/www.examlabs.com\/certification\/lpi-101-500-practice-test-questions-and-exam-dumps-part-17-q321-340\/","title":{"rendered":"LPI 101-500 Practice Test Questions and Exam Dumps Part 17 Q321-340"},"content":{"rendered":"<p><b>View Full<\/b> <a href=\"https:\/\/www.examlabs.com\/101-500-exam-dumps\"><b>LPI 101-500<\/b><b> Exam Dumps<\/b><\/a><b> and Practice Test Dumps<\/b><\/p>\n<p>&nbsp;<\/p>\n<p><b>Question: 321. Which command can display the absolute pathname of the current working directory after resolving symbolic links?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">whereis<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">realpath<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">basename<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">dirname<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. realpath<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">realpath<\/span><span style=\"font-weight: 400;\"> command resolves a pathname into an absolute pathname and can resolve symbolic links along the path. This is useful when a script or administrator needs to determine the actual filesystem location represented by a pathname rather than simply displaying the pathname supplied by the user. For example, symbolic links may make several different pathnames refer to the same underlying location. <\/span><span style=\"font-weight: 400;\">basename<\/span><span style=\"font-weight: 400;\"> extracts the final component of a pathname, while <\/span><span style=\"font-weight: 400;\">dirname<\/span><span style=\"font-weight: 400;\"> extracts the directory portion. <\/span><span style=\"font-weight: 400;\">whereis<\/span><span style=\"font-weight: 400;\"> searches for related files such as binaries and documentation rather than resolving a pathname.<\/span><\/p>\n<p><b>Question: 322. Which filesystem object provides a pathname reference to another file or directory?<\/b><\/p>\n<ol>\n<li><b><\/b><span style=\"font-weight: 400;\"> Hard link<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b><span style=\"font-weight: 400;\"> Inode<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b><span style=\"font-weight: 400;\"> Symbolic link<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b><span style=\"font-weight: 400;\"> File descriptor<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. Symbolic link<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">A symbolic link is a filesystem object containing a pathname that refers to another file or directory. Unlike a hard link, which references the same inode as another directory entry, a symbolic link has its own inode and stores a target pathname. This allows symbolic links to reference directories and, on typical Linux systems, targets located on another filesystem. If the target is moved or removed, the symbolic link can become dangling. Symbolic links are widely used to provide convenient alternate names, compatibility paths, and configurable references to files or directories.<\/span><\/p>\n<p><b>Question: 323. Which file commonly contains information used to define how filesystems are mounted automatically during system startup?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">\/etc\/mtab<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">\/etc\/mounts<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">\/etc\/filesystems<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. \/etc\/fstab<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"> file contains static filesystem mount configuration. It can specify devices, filesystem types, mount points, and mount options that the operating system can use when mounting filesystems. Entries in this file can also control whether particular filesystems are mounted automatically during boot or when <\/span><span style=\"font-weight: 400;\">mount -a<\/span><span style=\"font-weight: 400;\"> is executed. The exact syntax and available options depend on the system and filesystem. <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"> should be edited carefully because incorrect entries can cause mounting failures. It is different from runtime information describing filesystems that are currently mounted.<\/span><\/p>\n<p><b>Question: 324. Which option in <\/b><b>\/etc\/fstab<\/b><b> prevents a filesystem from being mounted automatically by <\/b><b>mount -a<\/b><b>?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">ro<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">auto<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">defaults<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">noauto<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 4. noauto<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">noauto<\/span><span style=\"font-weight: 400;\"> mount option tells the <\/span><span style=\"font-weight: 400;\">mount<\/span><span style=\"font-weight: 400;\"> command not to mount the corresponding filesystem automatically when <\/span><span style=\"font-weight: 400;\">mount -a<\/span><span style=\"font-weight: 400;\"> is used. This can be useful for filesystems that should be available only when explicitly requested, such as removable or infrequently used storage. The <\/span><span style=\"font-weight: 400;\">auto<\/span><span style=\"font-weight: 400;\"> option has the opposite effect by allowing automatic mounting through mechanisms that honor the option. <\/span><span style=\"font-weight: 400;\">ro<\/span><span style=\"font-weight: 400;\"> controls read-only access, while <\/span><span style=\"font-weight: 400;\">defaults<\/span><span style=\"font-weight: 400;\"> represents a collection of commonly used default mount options. Understanding these options is important when configuring <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"> safely.<\/span><\/p>\n<p><b>Question: 325. What is the primary purpose of the <\/b><b>\/var\/run<\/b><b> path on systems that retain this traditional pathname?<\/b><\/p>\n<ol>\n<li><b><\/b><span style=\"font-weight: 400;\"> Store permanent application databases<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b><span style=\"font-weight: 400;\"> Provide a location for runtime state information<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b><span style=\"font-weight: 400;\"> Store bootloader configuration<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b><span style=\"font-weight: 400;\"> Contain user home directories<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. Provide a location for runtime state information<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\/var\/run<\/span><span style=\"font-weight: 400;\"> is a traditional pathname associated with runtime state information created by services and processes. On many modern Linux systems, <\/span><span style=\"font-weight: 400;\">\/var\/run<\/span><span style=\"font-weight: 400;\"> is implemented as a symbolic link to <\/span><span style=\"font-weight: 400;\">\/run<\/span><span style=\"font-weight: 400;\">, which is the contemporary location for volatile runtime data. Such information can include process identifiers, sockets, and other state that is needed while the system is running but does not necessarily need to persist across reboots. This differs from <\/span><span style=\"font-weight: 400;\">\/var\/lib<\/span><span style=\"font-weight: 400;\">, which generally stores persistent variable application data. Understanding the relationship between <\/span><span style=\"font-weight: 400;\">\/var\/run<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">\/run<\/span><span style=\"font-weight: 400;\"> helps when interpreting older documentation.<\/span><\/p>\n<p><b>Question: 326. Which command displays the inode number associated with each listed filesystem entry?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">ls -i<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">ls -n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">ls -I<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">ls -d<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. ls -i<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">-i<\/span><span style=\"font-weight: 400;\"> option of <\/span><span style=\"font-weight: 400;\">ls<\/span><span style=\"font-weight: 400;\"> displays the inode number for each filesystem object in the listing. Inode numbers identify filesystem objects within a particular filesystem and are useful when investigating hard links, link counts, and filesystem metadata. Two different filenames can have the same inode number when they are hard links to the same underlying file. The <\/span><span style=\"font-weight: 400;\">-d<\/span><span style=\"font-weight: 400;\"> option controls how directory arguments are handled, while <\/span><span style=\"font-weight: 400;\">-n<\/span><span style=\"font-weight: 400;\"> changes ownership display to numeric user and group IDs. Therefore, <\/span><span style=\"font-weight: 400;\">ls -i<\/span><span style=\"font-weight: 400;\"> is the appropriate option when inode identification is required.<\/span><\/p>\n<p><b>Question: 327. Which <\/b><b>find<\/b><b> expression searches for regular files larger than 100 megabytes?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">find . -large 100M<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">find . -type f -size +100M<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">find . -file +100M<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">find . -size 100M -regular<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. find . -type f -size +100M<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The expression <\/span><span style=\"font-weight: 400;\">find . -type f -size +100M<\/span><span style=\"font-weight: 400;\"> combines two tests: <\/span><span style=\"font-weight: 400;\">-type f<\/span><span style=\"font-weight: 400;\"> restricts the results to regular files, and <\/span><span style=\"font-weight: 400;\">-size +100M<\/span><span style=\"font-weight: 400;\"> searches for files above the specified size threshold. This combination is useful when investigating disk usage because it excludes directories and other filesystem objects. The exact interpretation of size thresholds can depend on the unit syntax supported by the implementation, so administrators should consult the local <\/span><span style=\"font-weight: 400;\">find<\/span><span style=\"font-weight: 400;\"> documentation for precise behavior. Combining multiple <\/span><span style=\"font-weight: 400;\">find<\/span><span style=\"font-weight: 400;\"> tests is a powerful way to construct targeted filesystem searches.<\/span><\/p>\n<p><b>Question: 328. Which command is commonly used to search a prebuilt filename database rather than scanning directories directly?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">find<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">grep<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">locate<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">stat<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. locate<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">locate<\/span><span style=\"font-weight: 400;\"> command searches a prebuilt database containing filesystem pathnames. Because it searches indexed data rather than normally traversing the filesystem at the time of the query, it can return results very quickly. However, the database may not immediately reflect files that were recently created, moved, or removed. The <\/span><span style=\"font-weight: 400;\">find<\/span><span style=\"font-weight: 400;\"> command generally performs a live filesystem search and therefore provides current results but may take longer. <\/span><span style=\"font-weight: 400;\">grep<\/span><span style=\"font-weight: 400;\"> searches text content or command output, while <\/span><span style=\"font-weight: 400;\">stat<\/span><span style=\"font-weight: 400;\"> displays metadata about specified filesystem objects. The distinction between database-based and live searching is important in Linux administration.<\/span><\/p>\n<p><b>Question: 329. Which signal is normally associated with stopping a process so that it cannot continue until resumed?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">SIGCONT<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">SIGSTOP<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">SIGTERM<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">SIGCHLD<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. SIGSTOP<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">SIGSTOP<\/span><span style=\"font-weight: 400;\"> is a signal that stops a process&#8217;s execution. Unlike signals such as <\/span><span style=\"font-weight: 400;\">SIGTERM<\/span><span style=\"font-weight: 400;\">, it is not intended to request graceful termination. A stopped process can later be resumed using <\/span><span style=\"font-weight: 400;\">SIGCONT<\/span><span style=\"font-weight: 400;\">. <\/span><span style=\"font-weight: 400;\">SIGSTOP<\/span><span style=\"font-weight: 400;\"> is also notable because the process cannot catch, block, or ignore it. This makes it useful when a process must be forcibly suspended. <\/span><span style=\"font-weight: 400;\">SIGCONT<\/span><span style=\"font-weight: 400;\"> resumes a stopped process, <\/span><span style=\"font-weight: 400;\">SIGTERM<\/span><span style=\"font-weight: 400;\"> requests termination, and <\/span><span style=\"font-weight: 400;\">SIGCHLD<\/span><span style=\"font-weight: 400;\"> is commonly delivered to a parent when a child process changes state. Understanding signal purposes is important when managing Linux processes.<\/span><\/p>\n<p><b>Question: 330. What happens when a process becomes orphaned on a modern Linux system?<\/b><\/p>\n<ol>\n<li><b><\/b><span style=\"font-weight: 400;\"> It is automatically converted into a zombie<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b><span style=\"font-weight: 400;\"> It is immediately terminated<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b><span style=\"font-weight: 400;\"> It is adopted by an appropriate ancestor process such as PID 1<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b><span style=\"font-weight: 400;\"> It becomes a kernel thread<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. It is adopted by an appropriate ancestor process such as PID 1<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">An orphan process is a running process whose original parent has terminated. Rather than remaining without a parent, the process is adopted by another suitable ancestor, traditionally PID 1 on many Linux systems. Modern systems using systemd commonly have systemd as PID 1. This adoption allows the process to continue operating while maintaining a valid parent relationship. An orphan is different from a zombie: a zombie has already terminated but remains in the process table until its parent collects its exit status. Understanding parent-child relationships helps explain process lifecycle behavior.<\/span><\/p>\n<p><b>Question: 331. Which command can display the current shell&#8217;s process ID?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">echo $$<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">echo $PPID<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">echo $!<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">echo $?<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. echo $$<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The shell parameter <\/span><span style=\"font-weight: 400;\">$$<\/span><span style=\"font-weight: 400;\"> expands to the process ID of the current shell. Therefore, <\/span><span style=\"font-weight: 400;\">echo $$<\/span><span style=\"font-weight: 400;\"> displays the PID associated with that shell process. This is useful in shell scripts when a script needs to identify its own process or construct a temporary filename involving the shell&#8217;s PID. <\/span><span style=\"font-weight: 400;\">$PPID<\/span><span style=\"font-weight: 400;\"> instead represents the parent process ID, <\/span><span style=\"font-weight: 400;\">$!<\/span><span style=\"font-weight: 400;\"> commonly contains the PID of the most recently started background process, and <\/span><span style=\"font-weight: 400;\">$?<\/span><span style=\"font-weight: 400;\"> contains the exit status of the most recently completed foreground command. These special parameters provide different types of process and execution information.<\/span><\/p>\n<p><b>Question: 332. Which shell parameter contains the process ID of the most recently started background command?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">$0<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">$?<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">$$<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">$!<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 4. $!<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The special shell parameter <\/span><span style=\"font-weight: 400;\">$!<\/span><span style=\"font-weight: 400;\"> expands to the process ID of the most recently executed background pipeline or asynchronous command. It is useful when a script needs to save or later wait for a process that was started with <\/span><span style=\"font-weight: 400;\">&amp;<\/span><span style=\"font-weight: 400;\">. For example, a script can launch a background task, store <\/span><span style=\"font-weight: 400;\">$!<\/span><span style=\"font-weight: 400;\">, and then use that process identifier with <\/span><span style=\"font-weight: 400;\">wait<\/span><span style=\"font-weight: 400;\">. This differs from <\/span><span style=\"font-weight: 400;\">$$<\/span><span style=\"font-weight: 400;\">, which identifies the current shell, and <\/span><span style=\"font-weight: 400;\">$?<\/span><span style=\"font-weight: 400;\">, which represents the exit status of the most recently completed foreground command. Correctly distinguishing these parameters is important in shell scripting.<\/span><\/p>\n<p><b>Question: 333. Which command can show both running processes and their CPU and memory usage interactively?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">top<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">touch<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">tee<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">tr<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. top<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">top<\/span><span style=\"font-weight: 400;\"> command provides a continuously updated interactive view of running processes and system resource usage. It commonly displays information such as process IDs, CPU utilization, memory utilization, process ownership, and process state. Administrators can use it to identify processes consuming unusually large amounts of system resources. Unlike commands that provide a static process listing, <\/span><span style=\"font-weight: 400;\">top<\/span><span style=\"font-weight: 400;\"> refreshes its display while running, making it useful for observing changing workloads. Other utilities can provide process information, but <\/span><span style=\"font-weight: 400;\">top<\/span><span style=\"font-weight: 400;\"> is specifically designed for interactive monitoring of processes and system activity.<\/span><\/p>\n<p><b>Question: 334. Which command can send a specified signal to a process using its process ID?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">signal<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">kill<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">terminate<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">stop<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. kill<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">kill<\/span><span style=\"font-weight: 400;\"> command sends a signal to one or more processes identified by process ID. Despite its name, <\/span><span style=\"font-weight: 400;\">kill<\/span><span style=\"font-weight: 400;\"> does not always terminate a process because the signal can be selected explicitly. For example, an administrator can send <\/span><span style=\"font-weight: 400;\">SIGTERM<\/span><span style=\"font-weight: 400;\"> for a normal termination request or another appropriate signal for a different purpose. A signal can be specified by name or number depending on the command syntax. The command requires appropriate permissions when targeting processes owned by another user. Understanding signals makes <\/span><span style=\"font-weight: 400;\">kill<\/span><span style=\"font-weight: 400;\"> a general process-control utility rather than merely a termination command.<\/span><\/p>\n<p><b>Question: 335. Which shell command lists currently active jobs managed by the interactive shell?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">jobs<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">tasks<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">processes<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">activities<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. jobs<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">jobs<\/span><span style=\"font-weight: 400;\"> shell builtin displays jobs currently managed by the interactive shell&#8217;s job-control system. Its output can identify jobs running in the background, stopped jobs, and their job numbers. These job numbers can then be used with commands such as <\/span><span style=\"font-weight: 400;\">fg<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">bg<\/span><span style=\"font-weight: 400;\"> to manipulate the jobs. The <\/span><span style=\"font-weight: 400;\">jobs<\/span><span style=\"font-weight: 400;\"> command is different from process-monitoring tools such as <\/span><span style=\"font-weight: 400;\">ps<\/span><span style=\"font-weight: 400;\">, because it focuses on the shell&#8217;s own job table rather than providing a general listing of system processes. Job control is particularly useful when several commands are being run interactively from one terminal.<\/span><\/p>\n<p><b>Question: 336. Which shell builtin can resume a stopped job in the background?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">resume<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">continue-job<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">bg<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">start<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3. bg<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">bg<\/span><span style=\"font-weight: 400;\"> shell builtin resumes a stopped job and allows it to continue executing in the background. A job can commonly be stopped using terminal job-control mechanisms and then resumed with <\/span><span style=\"font-weight: 400;\">bg<\/span><span style=\"font-weight: 400;\">, allowing the user to continue using the shell prompt. The job can later be brought back to the foreground with <\/span><span style=\"font-weight: 400;\">fg<\/span><span style=\"font-weight: 400;\">. The command works with shell job specifications, such as <\/span><span style=\"font-weight: 400;\">%1<\/span><span style=\"font-weight: 400;\">, when multiple jobs are being managed. This differs from starting a completely new process because <\/span><span style=\"font-weight: 400;\">bg<\/span><span style=\"font-weight: 400;\"> operates on an existing shell-managed job.<\/span><\/p>\n<p><b>Question: 337. Which command prevents a shell script from continuing after a command fails by enabling immediate exit on a nonzero status?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">set -e<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">set -f<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">set -a<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">set -m<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. set -e<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">set -e<\/span><span style=\"font-weight: 400;\"> shell option enables an error-exit behavior in which the shell exits when a command returns a nonzero status, subject to several shell-specific exceptions and contextual rules. It is often used in scripts to prevent later commands from running after an unexpected failure. However, because the exact behavior of <\/span><span style=\"font-weight: 400;\">set -e<\/span><span style=\"font-weight: 400;\"> can be affected by constructs such as conditional commands, pipelines, and command lists, scripts should not assume that every nonzero status always causes immediate termination. Understanding these exceptions is important when writing reliable shell scripts.<\/span><\/p>\n<p><b>Question: 338. Which shell builtin can assign a variable whose value is restricted from being changed later in the same shell?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">export<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">readonly<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">declare -x<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">protect<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. readonly<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">readonly<\/span><span style=\"font-weight: 400;\"> shell builtin marks variables as read-only so that later attempts to assign a different value or unset them are normally rejected by the shell. This can be useful for protecting configuration values or constants used by a script. It is different from <\/span><span style=\"font-weight: 400;\">export<\/span><span style=\"font-weight: 400;\">, which makes a shell variable available to child processes through the environment. Filesystem permissions do not control shell-variable assignment, so <\/span><span style=\"font-weight: 400;\">chmod<\/span><span style=\"font-weight: 400;\"> cannot make a shell variable read-only. The exact syntax for creating and inspecting read-only variables can vary slightly between shells, but the underlying concept is broadly supported.<\/span><\/p>\n<p><b>Question: 339. Which shell parameter expands to the name used to invoke the shell script?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">$0<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">$1<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">**4. <\/span><span style=\"font-weight: 400;\">$@<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1. $0<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">In a typical shell script, <\/span><span style=\"font-weight: 400;\">$0<\/span><span style=\"font-weight: 400;\"> expands to the name or pathname used to invoke the script. It is often used when producing usage messages because it allows a script to refer to itself by the invocation name. <\/span><span style=\"font-weight: 400;\">$1<\/span><span style=\"font-weight: 400;\"> represents the first positional argument, <\/span><span style=\"font-weight: 400;\">$#<\/span><span style=\"font-weight: 400;\"> contains the number of positional arguments, and <\/span><span style=\"font-weight: 400;\">$@<\/span><span style=\"font-weight: 400;\"> expands to the positional arguments themselves. The exact representation of <\/span><span style=\"font-weight: 400;\">$0<\/span><span style=\"font-weight: 400;\"> can depend on how the script was invoked, so it should not always be interpreted as a canonical absolute pathname. Nevertheless, it is the standard shell parameter for the script&#8217;s invocation name.<\/span><\/p>\n<p><b>Question: 340. Which shell syntax allows a function to define a variable that is local to that function in shells supporting the <\/b><b>local<\/b><b> builtin?<\/b><\/p>\n<ol>\n<li><b><\/b> <span style=\"font-weight: 400;\">private variable=value<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>2.<\/b> <span style=\"font-weight: 400;\">local variable=value<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>3.<\/b> <span style=\"font-weight: 400;\">scope variable=value<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>4.<\/b> <span style=\"font-weight: 400;\">internal variable=value<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2. local variable=value<\/b><\/p>\n<p><b>Explanation:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><span style=\"font-weight: 400;\">local<\/span><span style=\"font-weight: 400;\"> builtin is used by several common shells to create variables whose scope is limited to the current function invocation. For example, <\/span><span style=\"font-weight: 400;\">local result=value<\/span><span style=\"font-weight: 400;\"> allows a function to use <\/span><span style=\"font-weight: 400;\">result<\/span><span style=\"font-weight: 400;\"> without normally modifying a global variable of the same name. Local variables make larger shell scripts easier to maintain because functions can use temporary variable names without unintentionally changing surrounding shell state. The exact scope rules and availability of <\/span><span style=\"font-weight: 400;\">local<\/span><span style=\"font-weight: 400;\"> can vary between shell implementations, so scripts intended for strict POSIX portability should account for those differences.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>View Full LPI 101-500 Exam Dumps and Practice Test Dumps &nbsp; Question: 321. Which command can display the absolute pathname of the current working directory after resolving symbolic links? whereis 2. realpath 3. basename 4. dirname Correct Answer: 2. realpath Explanation: The realpath command resolves a pathname into an absolute pathname and can resolve symbolic [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1648,1647],"tags":[],"_links":{"self":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/18638"}],"collection":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/comments?post=18638"}],"version-history":[{"count":1,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/18638\/revisions"}],"predecessor-version":[{"id":18639,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/18638\/revisions\/18639"}],"wp:attachment":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/media?parent=18638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/categories?post=18638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/tags?post=18638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}