Ultimate Guide to the 101-500 - Latest Mar 02, 2026 Edition Available Now [Q100-Q119]

Share

Ultimate Guide to the 101-500 - Latest Mar 02, 2026 Edition Available Now

2026 Updated Verified Pass 101-500 Exam - Real Questions and Answers

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

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

Answer: A


NEW QUESTION # 101
Which of the following are modes of the vi editor? (Choose two.)

  • A. command mode
  • B. change mode
  • C. review mode
  • D. edit mode
  • E. insert mode

Answer: A,E

Explanation:
Explanation
The modes of the vi editor that are correct are insert mode and command mode. The vi editor is a modal editor, which means that it has different modes for different operations. The insert mode allows the user to insert text into the file. The command mode allows the user to execute commands, such as saving, quitting,moving the cursor, searching, replacing, and so on. The user can switch between the modes by pressing certain keys, such as Esc, i, a, o, and others. The edit mode, change mode, and review mode are not valid modes of the vi editor.
References: LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.8: Use vi to create and edit files, vi editor


NEW QUESTION # 102
Which Debian package system command will list all partially installed packages and suggest how to get them correctly installed?

  • A. dpkg -C
  • B. apt-get -u
  • C. dpkg -l
  • D. dpkg -Dh
  • E. apt-get -y

Answer: A


NEW QUESTION # 103
Which run levels should never be declared as the default run level when using SysV init? (Choose TWO correct answers.)

  • A. 0
  • B. 1
  • C. 2
  • D. 3
  • E. 4

Answer: A,C

Explanation:
Run levels are predefined modes of operation in the SysV init system that determine which processes and services are started or stopped. The default run level is the one that the system enters after booting. It is usually specified in the /etc/inittab file with a line like id:5:initdefault:. The run levels 0 and 6 should never be declared as the default run level because they are used to halt and reboot the system, respectively. If they are set as the default, the system will enter an endless loop of shutting down and restarting. The other run levels (1-5) have different meanings depending on the distribution, but they usually correspond to single-user mode, multi-user mode, network mode, graphical mode, etc. References: LPI Linux Essentials - 1.101.2, LPI Linux Administrator - 101.3


NEW QUESTION # 104
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?

  • A. tr *c `\n\r' `' <newlist.txt> userlist.txt
  • B. tr *s `/^M/^J/' userlist.txt newlist.txt
  • C. tr *d `\r' < userlist.txt > newlist.txt
  • D. tr `\r' `\n' userlist.txt newlist.txt
  • E. tr `\r\n' `' <userlist.txt> newlist.txt

Answer: C


NEW QUESTION # 105
The___________command allows you to view or change serial port configuration.

Answer:

Explanation:
setserial
/bin/setserial


NEW QUESTION # 106
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 # 107
Which of the following are filesystems which can be used on Linux root partitions? (Choose two.)

  • A. XFS
  • B. VFAT
  • C. NTFS
  • D. swap
  • E. ext3

Answer: D,E


NEW QUESTION # 108
Which of the following command lines creates or, in case it already exists, overwrites a file called data with the output of ls?

  • A. ls > data
  • B. ls >& data
  • C. ls >> data
  • D. ls 3> data

Answer: A

Explanation:
Explanation
The command line that will create or, in case it already exists, overwrite a file called data with the output of ls is ls > data. The > character is a redirection operator that redirects the standard output (STDOUT) of a command to a file. If the file does not exist, it will be created. If the file already exists, it will be overwritten.
The 3> character is not a valid redirection operator. The >& character is a redirection operator that redirects both standard output (STDOUT) and standard error (STDERR) of a command to a file. The >> character is a redirection operator that appends the standard output (STDOUT) of a command to a file, without overwriting the existing file contents. References: LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.3: Perform basic file management, Redirection


NEW QUESTION # 109
What output will be displayed when the user fred executes the following command?
echo 'fred $USER'

  • A. 'fred fred'
  • B. 'fred $USER'
  • C. fred /home/fred/
  • D. fred fred
  • E. fred $USER

Answer: E

Explanation:
Explanation
This output will be displayed when the user fred executes the following command:
echo 'fred $USER'
The echo command is a built-in Linux feature that prints out arguments as the standard output. The syntax of the echo command is:
echo [option] [string]
The option can modify the behavior of the echo command, such as enabling the interpretation of escape characters or omitting the newline after the output. The string is the text that is displayed as the output.
The single quotation marks (' ') are used to enclose the string argument and prevent any expansion or substitution of the characters inside the quotation marks. This means that any variables, commands, or special characters inside the single quotation marks are treated as literal characters, not as expressions.
The $USER variable is a shell variable that holds the username of the current user. However, since it is enclosed in single quotation marks, it is not expanded to its value, but printed as it is.
Therefore, the command echo 'fred $USER' will print the string fred $USER as the output, without any changes. The output will be the same for any user who executes the command, not just fred.
The other outputs are incorrect for the following reasons:
* A, fred fred: This output would be displayed if the $USER variable was expanded to its value, which is fred for the user fred. However, since the $USER variable is enclosed in single quotation marks, it is not expanded, but printed as it is.
* B, fred /home/fred/: This output would be displayed if the $USER variable was expanded to its value, which is fred for the user fred, and then concatenated with the string /home/ to form a path. However, since the $USER variable is enclosed in single quotation marks, it is not expanded, but printed as it is.
Also, there is no concatenation operator in the echo command, so the string /home/ would not be added to the output.
* C, 'fred $USER': This output would be displayed if the single quotation marks were also printed as part of the output. However, the single quotation marks are not part of the string argument, but only used to enclose it and prevent any expansion or substitution. They are not displayed as the output.
* E, 'fred fred': This output would be displayed if the single quotation marks were also printed as part of the output, and the $USER variable was expanded to its value, which is fred for the user fred. However, neither of these conditions are true. The single quotation marks are not part of the string argument, but only used to enclose it and prevent any expansion or substitution. They are not displayed as the output.
The $USER variable is enclosed in single quotation marks, so it is not expanded, but printed as it is.
References:
* How to use Echo Command in Linux (With Examples) - phoenixNAP
* How to Use the Echo Command on Linux - How-To Geek
* echo command in Linux with Examples - GeeksforGeeks


NEW QUESTION # 110
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?

  • A. /lib/init.so
  • B. /sbin/init
  • C. /boot/init
  • D. /etc/rc.d/rcinit
  • E. /proc/sys/kernel/init

Answer: B

Explanation:
Explanation
The first program that is usually started, at boot time, by the Linux kernel when using SysV init is /sbin/init.
This program is responsible for reading the /etc/inittab file and executing the appropriate scripts and programs for each runlevel. The other options are not valid programs that are started by the kernel. /lib/init.so is a shared library that is used by some init programs, but not by SysV init. /etc/rc.d/rcinit is a script that is run by init, not by the kernel. /proc/sys/kernel/init is a kernel parameter that can be used to specify a different init program, but the default value is /sbin/init. /boot/init is not a standard location for an init program, and it is unlikely that the kernel would find it there. References:
* 1: SysVinit - ArchWiki
* 2: Linux: How to write a System V init script to start, stop, and restart my own application or service - nixCraft
* 3: sysvinit - Gentoo wiki


NEW QUESTION # 111
What command changes the nice level of a running process? (Specify ONLY the command without any path or parameters)

Answer:

Explanation:
renice
Explanation
The renice command changes the nice level of a running process. The nice level is a value that affects the scheduling priority of a process. A lower nice level means a higher priority and a higher nice level means a lower priority. The renice command requires the process ID (PID) of the target process and the new nice level as arguments. For example, renice -n 10 1234 will change the nice level of the process with PID 1234 to 10.
References: LPI Exam 101 Detailed Objectives, Topic 103: GNU and Unix Commands, Weight: 25, Objective 103.3: Perform basic file management, renice command


NEW QUESTION # 112
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 | less /tmp/foodata
  • B. foo | cp /tmp/foodata
  • C. foo > /tmp/foodata
  • D. foo | tee /tmp/foodata
  • E. foo > stdout >> /tmp/foodata

Answer: D

Explanation:
This command will display the output of the foo command on the screen and also write it to a file called /tmp
/foodata. The syntax of the command is:
foo | tee [options] [file]
The foo command is any command that produces some output. The | symbol is a pipe operator that redirects the standard output of one command to the standard input of another command. The tee command reads from the standard input and writes to both the standard output and one or more files. The options can modify the behavior of the tee command, such as appending to the file instead of overwriting it, or ignoring interrupt signals. The file is the name of the file to which the output is written. If no file is given, the tee command will only write to the standard output.
Therefore, the command foo | tee /tmp/foodata will run the foo command, pipe its output to the tee command, which will display the output on the screen and write it to the file /tmp/foodata.
The other commands are incorrect for the following reasons:
* A, foo | less /tmp/foodata: This command will not write the output of the foo command to a file, but it will display the output of the foo command on the screen in a pager. The less command is a program that allows the user to view and scroll through a file or the output of a command. The syntax of the command is:
foo | less [options] [file]
The foo command is any command that produces some output. The | symbol is a pipe operator that redirects the standard output of one command to the standard input of another command. The less command reads from the standard input or a file and displays it on the screen in a pager. The options can modify the behavior of the less command, such as setting the number of lines per screen, or searching for a pattern. The file is the name of the file to be viewed. If no file is given, the less command will read from the standard input.
Therefore, the command foo | less /tmp/foodata will run the foo command, pipe its output to the less command, which will display the output on the screen in a pager. However, the /tmp/foodata argument will be ignored by the less command, because it will read from the standard input instead of the file. The command will not write anything to the file /tmp/foodata.
* B, foo | cp /tmp/foodata: This command will not work as expected, because it has several errors. First, the cp command is not a valid command to write the output of a command to a file. The cp command is used to copy files or directories from one location to another. The syntax of the command is:
cp [options] source destination
The options can modify the behavior of the cp command, such as preserving the attributes of the files, or creating backups of the existing files. The source is the name of the file or directory to be copied. The destination is the name of the file or directory where the source is copied to.
Second, the pipe operator is not a valid way to redirect the output of a command to the cp command. The pipe operator redirects the standard output of one command to the standard input of another command. However, the cp command does not read from the standard input, but from the source argument. Therefore, the command foo | cp /tmp/foodata will run the foo command, pipe its output to the cp command, which will ignore the standard input and report an error for missing the destination argument. The command will not write anything to the file /tmp/foodata.
* C, foo > /tmp/foodata: This command will not display the output of the foo command on the screen, but it will write it to a file called /tmp/foodata. The > symbol is a redirection operator that redirects the standard output of a command to a file or device, overwriting any existing content. The syntax of the command is:
foo > file
The foo command is any command that produces some output. The > symbol redirects the standard output of the foo command to the file. The file is the name of the file to which the output is written.
Therefore, the command foo > /tmp/foodata will run the foo command, redirect its output to the file /tmp
/foodata, and overwrite any previous content. The command will not display anything on the screen.
* E, foo > stdout >> /tmp/foodata: This command will not work as expected, because it has several errors.
First, the stdout argument is not a valid file name or device name. The stdout is an abbreviation for the standard output, which is a stream that a program uses to write its output. However, the stdout is not a file or device that can be used as a destination for the redirection operator. Second, the >> symbol is a redirection operator that redirects the standard output of a command to a file or device, appending to any existing content. The syntax of the command is:
foo >> file
The foo command is any command that produces some output. The >> symbol redirects the standard output of the foo command to the file. The file is the name of the file to which the output is appended.
Therefore, the command foo > stdout >> /tmp/foodata will run the foo command, redirect its output to the stdout argument, which will cause an error, and then redirect its output again to the file /tmp/foodata, which will append the output to the file. The command will not display anything on the screen.
:
Linux Tee Command with Examples | Linuxize
tee command in Linux with examples - GeeksforGeeks
Linux tee command explained for beginners (6 examples) - HowtoForge
Command Options and Examples of Tee Command in Linux - UbuntuPIT
Linux tee Command Explained for Beginners (6 Examples) - Linux Handbook.


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

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

Answer: A,D


NEW QUESTION # 114
A user accidentally created the subdirectory \dir in his home directory. Which of the following commands will remove that directory?

  • A. rmdir '~/\dir'
  • B. rmdir ~/\\dir
  • C. rmdir ~/'dir'
  • D. rmdir "~/\dir"
  • E. rmdir ~/\dir

Answer: B


NEW QUESTION # 115
Which command is used to sync the hardware clock to the system clock? (Specify ONLY the command without any path or parameters.)

Answer:

Explanation:
Huclock


NEW QUESTION # 116
Which of the following GNU commands would be the most likely command you'd use to find the system load average?

  • A. nice
  • B. ps
  • C. loadavg
  • D. cpustat
  • E. top

Answer: E


NEW QUESTION # 117
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. paste -f 1,4 /etc/passwd
  • C. fmt -f 1,4 /etc/passwd
  • D. cut -d : -f 1,4 /etc/passwd

Answer: D


NEW QUESTION # 118
Which of the following partition types is used for Linux swap spaces when partitioning hard disk drives?

  • A. fd
  • B. 0
  • C. 1
  • D. 2
  • E. 8e

Answer: B

Explanation:
Explanation
Linux swap spaces are designated as type 82 on MBR (Master Boot Record) partition tables, which are used to store information about the partitions on a hard disk drive. This type code identifies the partition as a Linux swap area, which can be used by the Linux kernel to supplement the system RAM by holding idle memory pages. The mkswap command can be used to initialize a partition of type 82 as a swap partition. Other type codes are used for different purposes, such as 83 for Linux native partitions, 8e for Linux LVM partitions, fd for Linux RAID partitions, and 7 for NTFS partitions. References:
* How to create swap partition in Linux
* Choosing partition types for swap and root and choosing device for bootloader installation
* Creating and Using a Swap Partition
* Swap


NEW QUESTION # 119
......

Dumps Moneyack Guarantee - 101-500 Dumps Approved Dumps: https://passitsure.itcertmagic.com/Lpi/real-101-500-exam-prep-dumps.html