Achieve the 101-500 Exam Best Results with Help from Lpi Certified Experts [Q144-Q169]

Share

Achieve the 101-500 Exam Best Results with Help from Lpi Certified Experts

Provide 101-500 Practice Test Engine for Preparation


Lpi 101-500 Exam is an entry-level certification exam that is designed for individuals who are new to Linux operating system administration. 101-500 exam is also ideal for those who are seeking to switch their career to Linux administration. 101-500 exam is designed to validate the skills and knowledge of candidates in the areas of Linux operating system administration. 101-500 exam is also designed to test the candidate's ability to perform basic administrative tasks such as managing users and groups, managing files and directories, and configuring basic networking.


To prepare for the Lpi 101-500 exam, candidates should have a basic understanding of Linux and be able to perform common administrative tasks, such as user management, shell scripting, and basic networking. Candidates can also take advantage of various training courses, study materials, and practice exams to help them prepare for the exam and increase their knowledge and skills in Linux system administration.

 

NEW QUESTION # 144
Which of the following options for the kernel's command line changes the systemd boot target to rescue.target instead of the default target?

  • A. systemd.unit=rescue.target
  • B. systemd.service=rescue.target
  • C. systemd.target=rescue.target
  • D. systemd.default=rescue.target
  • E. systemd.runlevel=rescue.target

Answer: A


NEW QUESTION # 145
When considering the use of hard links, what are valid reasons not to use hard links?

  • A. Hard links are not available on all Linux systems because traditional filesystems, such as ext4, do not support them
  • B. Hard links are specific to one filesystem and cannot point to files on another filesystem
  • C. If users other than root should be able to create hard links, suln has to be installed and configured
  • D. When a hard linked file is changed, a copy of the file is created and consumes additional space
  • E. Each hard link has individual ownership, permissions and ACLs which can lead to unintended disclosure of file content

Answer: A


NEW QUESTION # 146
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?

  • A. sed '/bob/Bob' letter > newletter
  • B. sed s/bob/Bob/ letter < newletter
  • C. sed 's/bob, Bob/' letter > newletter
  • D. sed's/bob/Bob' letter > newletter
  • E. sed 's/bob/Bob/g' letter > newletter

Answer: E


NEW QUESTION # 147
Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?

  • A. whatis foo
  • B. locate foo
  • C. lsattr foo
  • D. which foo
  • E. apropos foo

Answer: C


NEW QUESTION # 148
Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?

  • A. split -c 1,4 /etc/passwd
  • B. cut -d : -f 1,4 /etc/passwd
  • C. fmt -f 1,4 /etc/passwd
  • D. paste -f 1,4 /etc/passwd

Answer: B


NEW QUESTION # 149
Which of the following commands shows the definition of a given shell command?

  • A. where
  • B. stat
  • C. case
  • D. type

Answer: D

Explanation:
Explanation
The type command shows the type of a given shell command, which can be one of the following: alias, keyword, function, builtin, or file. For example, type ls will show that ls is an alias for ls --color=auto. The type command can also show the full path of a file command, such as type grep will show that grep is
/bin/grep. References: LPI Linux Essentials, type command


NEW QUESTION # 150
Which of the following commands redirects the output of lsto standard error?
ls >-1

  • A. ls |error
  • B. ls >&2
  • C. ls >>2
  • D. ls <<ERR
  • E.

Answer: C


NEW QUESTION # 151
Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

  • A. p (lowercase)
  • B. u (lowercase)
  • C. U (uppercase)
  • D. i (lowercase)
  • E. P (uppercase)

Answer: A

Explanation:
Explanation
The p command in vi inserts the content of the buffer below the current line. The buffer is where the deleted or yanked text is stored temporarily. The P command inserts the buffer above the current line. The i command enters the insert mode before the cursor position. The U command restores the current line to its original state.
The u command undoes the last change made to the file. References:
* [LPI Linux Essentials - 1.3 Basic Editing]
* [LPI Linux Essentials - 1.4 I/O Redirection]
* [LPI Linux Essentials - 1.5 Manage Simple Partitions and Filesystems]


NEW QUESTION # 152
Which of the following statements are true about the boot sequence of a PC using a BIOS? (Choose two.)

  • A. Some parts of the boot process can be configured from the BIOS
  • B. The BIOS initiates the boot process after turning the computer on
  • C. Linux does not require the assistance of the BIOS to boot a computer
  • D. The BIOS is started by loading hardware drivers from secondary storage, such as the hard disk
  • E. The BIOS boot process starts only if secondary storage, such as the hard disk, is functional

Answer: A,B

Explanation:
Explanation
The boot sequence of a PC using a BIOS is the process of loading and executing the operating system from the power-on state. The BIOS (Basic Input/Output System) is a firmware program that is stored in a ROM chip on the motherboard and provides the interface between the hardware and the software. The BIOS performs the following tasks during the boot sequence12:
* It runs the power-on self-test (POST) to check the integrity and functionality of the hardware
* components and peripherals.
* It reads the BIOS settings from the CMOS memory and applies them to the system configuration. Some parts of the boot process, such as the boot device order, can be configured from the BIOS by pressing a specific key (usually F2, F10, or Del) during the POST.
* It locates and loads the boot loader program from the first sector of the boot device, which is usually the hard disk. The boot loader program can be GRUB, LILO, or Windows Boot Manager, depending on the operating system installed. The boot loader is responsible for loading the kernel and the initial ramdisk (initrd) into memory and passing control to them.
* It transfers the execution to the boot loader and exits the boot sequence.
The other options are false or irrelevant. Linux does require the assistance of the BIOS to boot a computer, at least until the kernel takes over the hardware control. The BIOS boot process does not start only if secondary storage is functional, it can also boot from other devices such as USB drives, CD-ROMs, or network. The BIOS is not started by loading hardware drivers from secondary storage, it is stored in a ROM chip and runs before any secondary storage is accessed. References:
* Linux Essentials - Linux Professional Institute Certification Programs1
* Exam 101 Objectives - Linux Professional Institute2
* The Linux Booting Process - 6 Steps Described in Detail - freeCodeCamp.org3
* Guide to the Boot Process of a Linux System - Baeldung4


NEW QUESTION # 153
In compliance with the FHS, in which of the directories are man pages found?

  • A. /var/pkg/man
  • B. /usr/share/man
  • C. /usr/doc/
  • D. /var/man
  • E. /opt/man

Answer: B

Explanation:
Explanation
According to the Filesystem Hierarchy Standard (FHS), the directory /usr/share/man contains manual pages for user commands, system calls, library functions, and other documentation1. The other directories are either non-standard, deprecated, or used for different purposes. For example, /opt/man is used for manual pages for add-on application software packages1, /usr/doc/ is an old location for documentation files that is no longer used2, /var/pkg/man and /var/man are not defined by the FHS. References:
* [LPI Linux Essentials - 1.6 Basic File Editing]
* [LPI Linux Essentials - 1.7 Personalize and/or Localize Your Linux System]
* [LPI Linux Essentials - 1.8 Basic Security and File Permissions]


NEW QUESTION # 154
Which of the following commands displays the contents of a gzip compressed tar archive?

  • A. tar ztf archive.tgz
  • B. tar cf archive.tgz
  • C. gzip archive.tgz | tar xvf -
  • D. gzip -d archive.tgz | tar tvf -

Answer: A

Explanation:
Explanation
The command that displays the contents of a gzip compressed tar archive is tar ztf archive.tgz. This command uses the following options:
-z: Tells tar to read or write archives through gzip, allowing it to work on compressed files directly. -t: Lists the contents of an archive without extracting it. -f archive.tgz: Specifies the name of the archive file.
The output of this command will show the names of the files and directories stored in the archive, one per line.
For example, if the archive contains three files named file1, file2, and file3, the output will be:
file1 file2 file3
The other commands are incorrect for the following reasons:
* gzip archive.tgz | tar xvf -: This command will decompress the archive using gzip and pipe it to tar, which will extract the files to the current directory. The - option tells tar to read the archive from the standard input. This command does not display the contents of the archive, but rather extracts them.
* gzip -d archive.tgz | tar tvf -: This command is similar to the previous one, except that it uses the -d option for gzip to decompress the archive instead of compressing it, and the -t option for tar to list the contents instead of extracting them. However, this command is redundant and inefficient, as tar can handle compressed archives directly with the -z option. Also, the -d option for gzip will delete the original archive file after decompression, which may not be desirable.
* tar cf archive.tgz: This command will create a new archive named archive.tgz from the files and directories given as arguments. However, this command does not use the -z option, so the archive will not be compressed with gzip. Also, this command does not display the contents of the archive, but rather creates it.


NEW QUESTION # 155
Which command displays the contents of the Kernel Ring Buffer on the command line? (Provide only the command name without any options or path information)

Answer:

Explanation:
dmesg, /bin/dmesg


NEW QUESTION # 156
After running the command umount /mnt, the following error message is displayed:
umount: /mnt: device is busy.
What is a common reason for this message?

  • A. A user has a file open in the /mnt directory.
  • B. The files in /mnt have been scanned and added to the locate database.
  • C. The kernel has not finished flushing disk writes to themounted device.
  • D. The kernel thinks that a process is about to open a file in /mnt for reading.
  • E. Another file system still contains a symlink to a file inside /mnt.

Answer: A

Explanation:
Explanation
One of the common reasons for the error message "device is busy" when trying to unmount a file system is that a user or a process has a file open in the mounted directory. This prevents the kernel from releasing the file system resources and detaching the device. To find out which user or process is holding the file system, one can use the lsof or fuser commands12. For example, lsof /mnt or fuser -m /mnt will list the processes that have open files in /mnt. To force the unmounting of a busy file system, one can use the -l option of the umount command, which will perform a lazy unmount. This means that the file system will be detached as soon as it is not busy anymore3. References: 1: How to solve "device is busy" problem in Linux 2: How to Find Out Which Process Is Using a File in Linux 3: umount(8) - Linux man page


NEW QUESTION # 157
What happens after issuing the command vi without any additional parameters?

  • A. vi exits with an error message as it cannot be invoked without a file name to operate on.
  • B. vi starts and loads the last file used andmoves the cursor to the position where vi was when it last exited.
  • C. vi starts and requires the user to explicitly either create a new or load an existing file.
  • D. vi starts in command mode and opens a new empty file.
  • E. vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.

Answer: D


NEW QUESTION # 158
When in Normal mode invi, which character can be used to begin a reverse search of the text?

  • A. ?
  • B. r
  • C. /
  • D. F

Answer: A

Explanation:
In vi, the ? character can be used to begin a reverse search of the text. This means that the search will start from the current cursor position and move backwards towards the beginning of the file. The search pattern can be any regular expression that matches the desired text. To repeat the search, the user can press n for the previous match or N for the next match. The / character can be used to begin a forward search of the text, which means that the search will start from the current cursor position and move forwards towards the end of the file. The F and r characters are not used for searching, but for other commands in vi. The F command is used to move the cursor to a previous occurrence of a specified character in the current line. The r command is used to replace the character under the cursor with another character. References:
* LPI 101-500 Exam Objectives, Topic 103.8, Weight 4
* LPI Learning Materials, Chapter 3.8, Advanced Scripting
* Web Search Results,


NEW QUESTION # 159
Which of the following characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?

  • A. !<
  • B. &<
  • C. <<
  • D. <|

Answer: C

Explanation:
Explanation
The << character is used to create a here document, which is a special type of redirection that reads input from the current source until a line containing only the delimiter (with no trailing blanks) is seen. The delimiter is specified after the << operator, and can be any string. For example, the following command will print everything between the << EOF and EOF lines:
cat << EOF This is a here document It can span multiple lines EOF
The output is:
This is a here document It can span multiple lines
The < character is used for normal input redirection, which reads data from a file or another command. The <| and !< characters are not valid redirection operators in Linux. The &< character is used to duplicate input file descriptors, which is an advanced topic not covered by the Linux Essentials exam. References:
* [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.4: Use streams, pipes and redirects, Weight: 4, Key Knowledge Areas: Redirecting standard input, standard output and standard error.
* [LPI Linux Essentials Certification All-in-One Exam Guide], Chapter 5: Working with Files, Page 167, Using Here Documents.


NEW QUESTION # 160
Which world-writable directory should be placed on a separate partition in order to prevent users from being able to fill up the / filesystem? (Specify the full path to the directory.)

Answer:

Explanation:
/tmp, tmp,/var/tmp, /tmp/, /var/tmp/


NEW QUESTION # 161
To what environment variable will you assign or append a value if you need to tell the dynamic linker to look in a build directory for some of a program's shared libraries?

  • A. LD_LIBRARY_PATH
  • B. LD_LIB_PATH
  • C. LD_RUN_PATH
  • D. LD_LOAD_PATH
  • E. LD_SHARE_PATH

Answer: A

Explanation:
Explanation
The environment variable LD_LIBRARY_PATH is used to tell the dynamic linker to look in a specific directory for some of a program's shared libraries. It is a colon-separated list of directories that are searched by the dynamic linker when looking for a shared library to load1. The directories are searched in the order they are mentioned in. For example, if we have a program that depends on a shared library libfoo.so that is located in /home/user/build/lib, we can run the program with:
LD_LIBRARY_PATH=/home/user/build/lib ./program
This will instruct the dynamic linker to search for libfoo.so in /home/user/build/lib before the default directories. The environment variable LD_LIBRARY_PATH can also be appended to an existing value with the += operator, for example:
LD_LIBRARY_PATH+=:/home/user/build/lib
This will add /home/user/build/lib to the end of the LD_LIBRARY_PATH list. The other options are not valid environment variables for the dynamic linker. LD_LOAD_PATH, LD_LIB_PATH, and LD_SHARE_PATH are not recognized by the dynamic linker. LD_RUN_PATH is a linker option that can be used to embed a librarysearch path in the executable at link time, but it is not an environment variable that can be set or modified at run time2. References:
* LPI Exam 101 Detailed Objectives, section 1.101.3
* ld-linux(8) - Linux manual page
* Setting the dynamic linker with an environment variable - narkive


NEW QUESTION # 162
Which of the following commands installs all packages with a name ending with the string foo?

  • A. zypper get "*foo"
  • B. zypper update "foo?"
  • C. zypper install "*foo"
  • D. zypper force "foo*"
  • E. zypper add ".*foo"

Answer: C

Explanation:
Explanation
The command that installs all packages with a name ending with the string foo is zypper install "*foo". The zypper command is the command line interface of the ZYpp package manager for SUSE Linux. The install (in) subcommand is used to install packages with specified capabilities or RPM files with specified location.
The argument "*foo" is a glob pattern that matches any package name that ends with foo. For example, zypper install "foo" will install packages like barfoo, bazfoo, and foo itself. The other commands are either invalid or do not perform the desired task. The zypper get, zypper update, zypper force, and zypper add subcommands do not exist. The "foo?" and "foo" arguments are also invalid glob patterns, as they do not match the end of the package name. The ".*foo" argument is a valid glob pattern, but it matches any package name that contains foo, not just the ones that end with foo. References:
* Zypper package manager - SUSE Documentation1
* zypper(8) [suse man page] - The UNIX and Linux Forums2
* 45 Zypper Commands to Manage 'Suse' Linux Package Management - Tecmint


NEW QUESTION # 163
In a nested directory structure, which find command line option would be used to restrict the command to searching down a particular number of subdirectories?
-maxdepth

  • A. -s
  • B. -n
  • C. -dirmax
  • D. -maxlevels
  • E.

Answer: C


NEW QUESTION # 164
Which of the following commands kills the process with the PID 123 but allows the process to "clean up" before exiting?

  • A. kill -TERM 123
  • B. kill -PIPE 123
  • C. kill -STOP 123
  • D. kill -KILL 123

Answer: A

Explanation:
Explanation
The command kill -TERM 123 kills the process with the PID 123 but allows the process to "clean up" before exiting. The option -TERM specifies the signal to be sent to the process, which is the termination signal (SIGTERM). This signal requests the process to terminate gracefully, which means that the process can perform any necessary actions before exiting, such as closing files, releasing resources, or saving data. The process can also catch the signal and ignore it or handle it in a different way, if it is programmed to do so. The syntax is: kill -TERM pid. For example, kill -TERM 123 will send the SIGTERM signal to the process with the PID 123, asking it to terminate nicely. The other options are not correct because:
* A. kill -PIPE 123: This command sends the broken pipe signal (SIGPIPE) to the process, which is not used to kill the process, but to notify it that the other end of a pipe has been closed. This signal is usually ignored by the process, unless it is writing to the pipe, in which case it will cause the process to terminate1.
* B. kill -KILL 123: This command sends the kill signal (SIGKILL) to the process, which is the most powerful way to kill the process, but it does not allow the process to "clean up" before exiting. The SIGKILL signal cannot be caught, blocked, or ignored by the process, and it forces the process to terminate immediately, without performing any actions. This command should be used as a last resort, when the process is unresponsive or causing harm to the system2.
* C. kill -STOP 123: This command sends the stop signal (SIGSTOP) to the process, which is not used to kill the process, but to pause it. The SIGSTOP signal cannot be caught, blocked, or ignored by the process, and it suspends the execution of the process until it receives a continue signal (SIGCONT). This command can be used to temporarily stop a process from running, without terminating it3. References:
* What is the purpose of the SIGPIPE signal? - Stack Overflow
* How to kill a process in Linux - LinuxConfig.org
* Linux Signals - GeeksforGeeks


NEW QUESTION # 165
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)

  • A. Additional rules for udev can be created by adding them to /etc/udev/rules.d/.
  • B. The /dev/ directory is a filesystem of type tmpfs and is mounted by udev during system startup.
  • C. Entries for all possible devices get created on boot even if those devices are not connected.
  • D. When using udev, it is not possible to create block orcharacter devices in /dev/ using mknod.
  • E. The content of /dev/ is stored in /etc/udev/dev and is restored during system startup.

Answer: A,B

Explanation:
Explanation
udev is a device manager that dynamically creates and removes device nodes in the /dev/ directory. It also handles device events, such as adding, removing, or changing the attributes of devices. udev uses rules to match devices and assign properties, permissions, names, symlinks, and other actions. The rules are stored in files under /lib/udev/rules.d/ and /etc/udev/rules.d/. The latter directory can be used to create additional or override existing rules. The /dev/ directory is not a regular directory on the root filesystem, but a virtual filesystem of type tmpfs that is mounted by udev during system startup. tmpfs is a filesystem that resides in memory and can grow and shrink dynamically. The content of /dev/ is not stored in /etc/udev/dev, but is created by udev based on the rules and the available devices. udev does not prevent the creation of block or character devices in /dev/ using mknod, but it may overwrite or remove them if they conflict with the rules or the device events. References: LPI Linux Essentials - 1.101.2, LPI Linux Administrator - 102.4


NEW QUESTION # 166
In Bash, inserting 1>&2 after a command redirects

  • A. standard error to standard output.
  • B. standard output to standard input.
  • C. standard input to standard error.
  • D. standard error to standard input.
  • E. standard output to standard error.

Answer: E

Explanation:
Explanation
In Bash, inserting 1>&2 after a command redirects standard output to standard error. This means that the output of the command that normally goes to the standard output stream (file descriptor 1) will be sent to the standard error stream (file descriptor 2) instead. This can be useful if we want to capture or discard both the normal output and the error output of a command. For example, if we want to run a command and send both its output and error to /dev/null (a special device that discards any data written to it), we can use:
command > /dev/null 1>&2
This will redirect the standard output of command to /dev/null, and then redirect the standard error of command to the same place as the standard output, which is /dev/null. The other options are not correct because:
* A. standard error to standard input: This is not possible, because standard input is a read-only stream, and we cannot redirect output to it.
* B. standard input to standard error: This is not what 1>&2 does, because 1 refers to standard output, not standard input. To redirect standard input to standard error, we would need to use 0>&2, where 0 refers to standard input.
* D. standard error to standard output: This is not what 1>&2 does, because it would require the opposite order of file descriptors: 2>&1. This would redirect standard error to standard output, not the other way around.
* E. standard output to standard input: This is not possible, for the same reason as option A. References:
* Bash redirections cheat sheet
* How to redirect stderr to a file - Linuxize


NEW QUESTION # 167
Which of the following directories on a 64 bit Linux system typically contain shared libraries? (Choose two.)
~/.lib64/

  • A. /lib64/
  • B. /usr/lib64/
  • C. /opt/lib64/
  • D. /var/lib64/
  • E.

Answer: C,D


NEW QUESTION # 168
Which RPM command will output the name of the package which supplied the file /etc/exports?

  • A. rpm -qf /etc/exports
  • B. rpm -qp /etc/exports
  • C. rpm -F /etc/exports
  • D. rpm -Kl /etc/exports
  • E. rpm -qi/etc/exports

Answer: A


NEW QUESTION # 169
......

Detailed New 101-500 Exam Questions for Concept Clearance: https://www.actualtorrent.com/101-500-questions-answers.html

101-500 Exam Preparation Material with New 101-500 Dumps Questions.: https://drive.google.com/open?id=1gxmKxtE_GLq0vJ7FmGbf-vV-Umq8CIci