Free Lpi 101-500 Exam Questions and Answer from Training Expert ExamsReviews
Top Lpi 101-500 Courses Online
Exam Topics in Detail
Here's an in-depth review of the test objectives for 101-500 exam:
System Architecture
Under this domain, candidates should understand how to configure hardware systems like mass storage devices. Also, they must be familiar with system booting and changing boot targets, and reboot or shut down the systems. In particular, candidates must know how to work with integrated peripherals, SysVinit and systemd, and BIOS. Also, you must focus on developing skills in SysVinit runlevel, switching it, and terminating it properly.
NEW QUESTION # 91
Given the following input stream:
txt1.txt
atxt.txt
txtB.txt
Which of the following regular expressions turns this input stream into the following output stream?
txt1.bak.txt
atxt.bak.txt
txtB.bak.txt
- A. s/^.txt/.bak/
- B. s/[.txt]/.bak$1/
- C. s/txt/bak.txt/
- D. s/^txt$/.bak^/
- E. s/txt$/bak.txt/
Answer: E
NEW QUESTION # 92
Which of the following commands are common Linux commands for file management? (Choose three correct answers.)
- A. mv
- B. copy
- C. move
- D. cp
- E. mkdir
Answer: A,D,E
NEW QUESTION # 93
FILL BLANK
Which command is used to start another command with a given nice level? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
nice
NEW QUESTION # 94
Which of the following commands can be used to determine how long the system has been running? (Choose TWO correct answers.)
- A. up
- B. uname -u
- C. top
- D. uptime
- E. time -up
Answer: C,D
NEW QUESTION # 95
Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?
- A. whereis
- B. basename
- C. which
- D. query
- E. dirname
Answer: A
Explanation:
Explanation
The correct command to locate programs and their corresponding man pages and configuration files is whereis. The whereis command searches for the binary, source, and manual files for a given command name in a list of standard Linux directories. It can also accept a list of directories to search in by using the -B, -M, or
-S options. The whereis command is useful for finding the location and documentation of a program. The other commands are not suitable for this task. The dirname command strips the last component from a file name and returns the directory name. The which command shows the full path of a command that is in the $PATH variable. The basename command strips the directory and suffix from a file name and returns the base name.
The query command is not a standard Linux command. References:
* [LPI Linux Essentials - 1.1 The Linux Community and a Career in Open Source]
* [LPI Linux Essentials - 1.2 Finding Your Way on a Linux System]
* [LPI Linux Essentials - 1.4 Finding Files]
* whereis command in Linux with Examples - GeeksforGeeks
* Whereis Command in Linux | Linuxize
* Linux whereis Command Explained for Beginners (5 Examples) - HowtoForge
* whereis command | Linux# - Geek University
* whereis command in Linux - LinuxForDevices
NEW QUESTION # 96
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
- A. /boot/init
- B. /etc/rc.d/rcinit
- C. /sbin/init
- D. /proc/sys/kernel/init
- E. /lib/init.so
Answer: C
NEW QUESTION # 97
In the vi editor, how can commands such as moving the cursor or copying lines into the buffer be issued multiple times or applied to multiple rows?
- A. By specifying the number right in front of a command such as 41or 2yj.
- B. By issuing a command such as :set repetition=4 with repeats every subsequent command 4 times.
- C. By selecting all affected lines using the shit and cursor keys before applying the command.
- D. By using the command :repeat followed by the number and the command
- E. By specifying the number after a command such as 14or yj2followed by escape.
Answer: A
NEW QUESTION # 98
Which of the following commands print the current working directory when using a Bash shell? (Choose two.)
- A. echo "${WD}"
- B. echo "${PWD}"
- C. pwd
- D. echo "${pwd}"
- E. printwd
Answer: B,C
Explanation:
Explanation
PWD",C.pwdComprehensiveExplanation:ThecommandsthatwillprintthecurrentworkingdirectorywhenusingaBas and pwd. The echo command will print the value of the PWD variable, which is set by the shell to the current working directory. The pwd command will print the name of the current working directory. The WD variable is not a standard shell variable and may not be defined. The printwd command is not a valid Linux command.
The pwd variable is not the same as the PWD variable and may not be defined.References:LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.1: Work on the command line, echo command, pwd command
NEW QUESTION # 99
Which SysV init configuration file should be modified to disable the ctrl-alt-delete key combination?
- A. /etc/inittab
- B. /proc/keys
- C. /etc/keys
- D. /proc/inittab
- E. /etc/reboot
Answer: A
Explanation:
Explanation
The /etc/inittab file is used by the SysV init system to configure the behavior of different runlevels and the actions to be taken when certain events occur. One of the events that can be configured is the ctrl-alt-delete key combination, which by default triggers a system reboot. To disable this feature, the /etc/inittab file should be modified to comment out or remove the line that starts with ca::ctrlaltdel:. References: LPI Linux Essentials
- 1.101.2, LPI Linux Administrator - 101.1
NEW QUESTION # 100
What does the command mount --bind do?
- A. It makes the contents of one directory available in another directory
- B. It permanently mounts a regular file to a directory
- C. It mounts all user mountable filesystems to the user's home directory
- D. It mounts all available filesystems to the current directory
- E. It mounts all file systems listed in /etc/fstab which have the option userbind set
Answer: A
Explanation:
Explanation
The mount --bind command is used to create a bind mount, which is an alternate view of a directory tree. A bind mount takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data. For example, after issuing the command:
mount --bind /some/where /else/where
the directories /some/where and /else/where have the same content, which is the content of /some/where. A bind mount can be useful for accessing hidden files, creating chroot environments, or changing the permissions or ownership of files.
The other options are not correct because:
* B. It mounts all available filesystems to the current directory: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all available filesystems to the current directory, one would need to use the mount -a command with the -t option and specify the current directory as the target.
* C. It mounts all user mountable filesystems to the user's home directory: This is not what the mount
--bind command does. The mount --bind command only creates a bind mount for a single directory tree.
To mount all user mountable filesystems to the user's home directory, one would need to use the mount
-a command with the -t option and specify the user's home directory as the target. However, this is not a common or recommended practice, as it may cause conflicts or errors with the existing files and directories in the user's home directory.
* D. It mounts all file systems listed in /etc/fstab which have the option userbind set: This is not what the mount --bind command does. The mount --bind command only creates a bind mount for a single directory tree. To mount all file systems listed in /etc/fstab which have the option userbind set, one would need to use the mount -a command with the -O option and specify userbind as the option.
However, this is not a standard or supported option for the mount command or the /etc/fstab file, and it may not work as expected.
* E. It permanently mounts a regular file to a directory: This is not what the mount --bind command does.
The mount --bind command only creates a bind mount for a directory tree, not a regular file. To mount a regular file to a directory, one would need to use the mount command with the -o loop option and specify the file and the directory as the source and the target. However, this is only possible for files that contain a valid filesystem image, such as an ISO file or a disk image. A bind mount is not permanent, and it can be unmounted with the umount command.
References:
* Understanding Bind Mounts | Baeldung on Linux
* What is a bind mount? - Unix & Linux Stack Exchange
* mount(8) - Linux manual page
NEW QUESTION # 101
Which of the following is a limitation of the cut command?
- A. Thecutcommand cannot reorder fields.
- B. Thecutcommand can only select output by field position.
- C. Thecutcommand only works on ASCII text.
- D. Thecutcommand cannot use different input and output delimiters.
Answer: A
Explanation:
Explanation
The cut command is used to extract selected portions of each line of a file or a stream. The -f option is used to specify the fields to be extracted, separated by commas. The -d option is used to specify the delimiter that separates the fields. The default delimiter is the tab character. The cut command can only select output by field position, not by field content. The cut command can also work on non-ASCII text, such as UTF-8 encoded text. The cut command can use different input and output delimiters, but only if the output delimiter is specified by the --output-delimiter option. The cut command cannot reorder fields, meaning that the output fields will always appear in the same order as the input fields. To reorder fields, other commands such as awk or sed can be used. References:
* LPI 101-500 Exam Objectives, Topic 103.7, Weight 4
* LPI Learning Materials, Chapter 3.7, Basic Scripting
* Web Search Results,
NEW QUESTION # 102
Instead of supplying an explicit device in /etc/fstab for mounting, what other options may be used to identify the intended partition? (Choose two.) LABEL
- A. ID
- B. UUID
- C.
- D. FIND
- E. NAME
Answer: A,C
NEW QUESTION # 103
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
Explanation The command that displays the contents of the Kernel Ring Buffer on the command line is dmesg12. The dmesg command is a Linux utility that displays kernel-related messages retrieved from the kernel ring buffer12. The ring buffer stores information about hardware, device driver initialization, and messages fromkernel modules that take place during system startup12. The dmesg command is invaluable when troubleshooting hardware-related errors, warnings, and for diagnosing device failure2.
The dmesg command can be used with various options to control the output format, filter the messages by facility or level, clear the ring buffer, or follow the new messages in real time123. For example, the following command displays the last 10 messages from the kernel ring buffer:
$ dmesg | tail -10
The following command displays the messages from the kernel ring buffer in a human-readable format with colored output:
$ dmesg -H --color
The following command displays the messages from the kernel ring buffer that have the facility kern and the level emerg:
$ dmesg -f kern -l emerg
The following command clears the ring buffer:
$ dmesg --clear
The following command keeps dmesg running and waiting for new messages:
$ dmesg -w
References:
1: dmesg Linux Command {Syntax, Options and Examples} - phoenixNAP 2: Ubuntu Manpage: dmesg - print or control the kernel ring buffer 3: Display Recent Kernel Messages (console, kernel ring buffer, facilities)
NEW QUESTION # 104
The dpkg-____ command will ask configuration questions for a specified package, just as if the package were being installed for the first time.
Answer:
Explanation:
reconfigure
NEW QUESTION # 105
Which file in the /proc filesystem lists parameters passed from the bootloader to the kernel? (Specify the file name only without any path.)
Answer:
Explanation:
cmdline, /proc/cmdline
NEW QUESTION # 106
While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?
- A. :r
- B. :w
- C. :n
- D. :e
Answer: D
NEW QUESTION # 107
Which of the following commands can be used to download the RPM package kernel without installing it?
- A. rpm --download --package kernel
- B. rpmdownload kernel
- C. yumdownloader kernel
- D. yum download --no-install kernel
Answer: C
Explanation:
Explanation
The command that can be used to download the RPM package kernel without installing it is yumdownloader kernel. This command is part of the yum-utils package, which contains a suite of helper tools for yum package manager. To use this command, you need to install the yum-utils package first1. The downloaded package will be saved in the current directory. You need to use root privilege because yumdownloader will update package index files during downloading. Unlike yum command, yumdownloader will not download any dependent packages1.
The other commands are either invalid or do not have the desired functionality. yum download --no-install kernel is not a valid yum command, as yum does not have a --no-install option2. rpm --download --package kernel is not a valid rpm command, as rpm does not have a --download or a --package option3. rpmdownload kernel is not a standard Linux command. rpm has a native support to download a package from a URL and install it, but not to download a package without installing it4.
References:
* How to use yum to download an RPM package without installing it - Xmodulo
* yum(8) - Linux manual page
* rpm(8) - Linux manual page
* How to download an RPM package and install it in one line?
NEW QUESTION # 108
Which of the following commands displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?
- A. foo | cp /tmp/foodata
- B. foo > /tmp/foodata
- C. foo > stdout >> /tmp/foodata
- D. foo | tee /tmp/foodata
- E. foo | less /tmp/foodata
Answer: D
NEW QUESTION # 109
What does the? symbol within regular expressions represent?
- A. Match the preceding qualifier zero or more times.
- B. Match a literal? character.
- C. Match the preceding qualifier zero or one times.
- D. Match the preceding qualifier one or more times.
Answer: C
Explanation:
Explanation
The ? symbol within regular expressions represents an optional match of the preceding qualifier. A qualifier is a character or a group of characters that can be repeated a certain number of times, such as , +, ?, {n}, {n,}, or
{n,m}. The ? symbol means that the qualifier can occur zero or one times, but not more. For example, the regular expression colou?r matches both "color" and "colour", but not "colouur" or "colr". The ? symbol can also be used to make other qualifiers lazy, meaning that they will match the smallest possible number of characters, instead of the largest (greedy). For example, the regular expression a.?b matches the shortest string that starts with "a" and ends with "b", such as "ab" or "a-b", but not "a-b-c". References:
* [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.7: Perform basic file management, Weight: 4, Key Knowledge Areas: Use of egrep to search for extended regular expressions in text output.
* [Regular expression syntax cheat sheet], Topic: Quantifiers.
NEW QUESTION # 110
After modifying GNU GRUB's configuration file, which command must be run for the changes to take effect?
- A. grub
- B. No action is required
- C. kill -HUP $(pidof grub)
- D. grub-install
Answer: B
NEW QUESTION # 111
What is the purpose of the xargs command?
- A. It reads standard input (STDIN) and builds up command lines to execute.
- B. It asks a question, graphically, and returns the answer to the shell.
- C. It allows users to specify long options for commands that normally only accept short options.
- D. It passes arguments to an X server.
- E. It helps shellscripts take variable argument lists.
Answer: A
NEW QUESTION # 112
Consider the following output from the command ls -i:
How would a new file named c.txt be created with the same inode number as a.txt(Inode 525385)?
ln -h a.txt c.txt
- A. ln -i 525385 c.txt
- B. ln c.txt a.txt
- C. ln -f c.txt a.txt
- D. ln a.txt c.txt
Answer: C
NEW QUESTION # 113
Which of the following commands displays the output of the foocommand on the screen and also writes it to a file called /tmp/foodata?
foo | less /tmp/foodata
- A. foo | cp /tmp/foodata
- B. foo > /tmp/foodata
- C. foo | tee /tmp/foodata
- D. foo > stdout >> /tmp/foodata
- E.
Answer: D
NEW QUESTION # 114
Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?
- A. SIGTERM
- B. SIGSTOP
- C. SIGKILL
- D. SIGINT
Answer: D
Explanation:
Explanation
The SIGINT signal is sent to a process when the user presses the key combination CTRL+C on the keyboard.
This signal is used to interrupt the process and cause it to terminate, unless the process catches or ignores the signal. The SIGTERM signal is the default signal sent by the kill command to request a process to terminate gracefully. The SIGSTOP signal is used to pause a process and make it stop executing until it receives a SIGCONT signal. The SIGKILL signal is used to force a process to terminate immediately and cannot be caught or ignored by the process. References:
* LPIC-1 Exam 101 Objectives, Topic 103: GNU and Unix Commands, 103.2 Process management
* LPIC-1 Linux Administrator 101-500 Exam FAQ, LPIC-1 Exam 101 Objectives, GNU and Unix Commands (Total Weight: 25)
NEW QUESTION # 115
Which of the following are init systems used within Linux systems? (Choose THREE correct answers.)
- A. Upstart
- B. SysV init
- C. startd
- D. SysInit
- E. systemd
Answer: A,B,E
NEW QUESTION # 116
......
New (2024) Lpi 101-500 Exam Dumps: https://www.examsreviews.com/101-500-pass4sure-exam-review.html
101-500 Practice Dumps - Verified By ExamsReviews Updated 246 Questions: https://drive.google.com/open?id=1KdKgN7Mhk5iUxUtI10v2wN2eLjXdfW-1