101-500 Exam Question 26
Which of the following describes the correct order in which the components of the system boot process are started?
Correct Answer: B
The system boot process is the sequence of steps that the system follows when it is powered on or restarted.
The system boot process can be divided into four main components: BIOS, bootloader, kernel, and init system. The order in which these components are started is:
* BIOS: BIOS stands for Basic Input/Output System, and it is the first component that runs when the system is powered on. BIOS is a firmware program that is stored in a ROM chip on the motherboard, and it performs some basic tasks, such as:
* initializing the hardware components and peripherals
* performing the power-on self-test (POST) to check the system integrity
* selecting a boot device from the boot order list
* loading and executing the bootloader program from the boot device
* Bootloader: Bootloader is a small program that is responsible for loading and executing the kernel.
Bootloader is usually stored in the first sector of the boot device, which can be a hard disk, a USB drive, or a CD-ROM. Bootloader can also display a menu that allows the user to choose from different kernel images or operating systems. Some common bootloaders for Linux systems are GRUB, LILO, and SYSLINUX.
* Kernel: Kernel is the core of the operating system, and it manages the system resources, controls the hardware devices, and provides basic services to other programs. Kernel is a large binary file that is compressed and stored in the boot device, usually in the /boot directory. Kernel is loaded into memory and executed by the bootloader, and it performs some tasks, such as:
* decompressing itself and relocating to a higher memory address
* detecting and initializing the hardware devices and drivers
* mounting the root filesystem and creating a temporary filesystem in RAM
* starting the init system, which is the first user-space program
* Init system: Init system is the program that initializes the user-space environment and spawns all other processes. Init system is always the first process that runs on the system, and it has the process ID (PID) of 1. Init system can also perform some tasks, such as:
* reading the configuration files and scripts that define the system services and runlevels
* starting and stopping the system services and daemons
* managing the system logins and terminals
* running a graphical user interface or a command-line interface
Some common init systems for Linux systems are SysVinit, systemd, and Upstart.
References:
Guide to the Boot Process of a Linux System - Baeldung
The Linux Booting Process - 6 Steps Described in Detail - freeCodeCamp.org Boot Process with Systemd in Linux - GeeksforGeeks Linux Boot Process Step-by-Step Explained - javatpoint
The system boot process can be divided into four main components: BIOS, bootloader, kernel, and init system. The order in which these components are started is:
* BIOS: BIOS stands for Basic Input/Output System, and it is the first component that runs when the system is powered on. BIOS is a firmware program that is stored in a ROM chip on the motherboard, and it performs some basic tasks, such as:
* initializing the hardware components and peripherals
* performing the power-on self-test (POST) to check the system integrity
* selecting a boot device from the boot order list
* loading and executing the bootloader program from the boot device
* Bootloader: Bootloader is a small program that is responsible for loading and executing the kernel.
Bootloader is usually stored in the first sector of the boot device, which can be a hard disk, a USB drive, or a CD-ROM. Bootloader can also display a menu that allows the user to choose from different kernel images or operating systems. Some common bootloaders for Linux systems are GRUB, LILO, and SYSLINUX.
* Kernel: Kernel is the core of the operating system, and it manages the system resources, controls the hardware devices, and provides basic services to other programs. Kernel is a large binary file that is compressed and stored in the boot device, usually in the /boot directory. Kernel is loaded into memory and executed by the bootloader, and it performs some tasks, such as:
* decompressing itself and relocating to a higher memory address
* detecting and initializing the hardware devices and drivers
* mounting the root filesystem and creating a temporary filesystem in RAM
* starting the init system, which is the first user-space program
* Init system: Init system is the program that initializes the user-space environment and spawns all other processes. Init system is always the first process that runs on the system, and it has the process ID (PID) of 1. Init system can also perform some tasks, such as:
* reading the configuration files and scripts that define the system services and runlevels
* starting and stopping the system services and daemons
* managing the system logins and terminals
* running a graphical user interface or a command-line interface
Some common init systems for Linux systems are SysVinit, systemd, and Upstart.
References:
Guide to the Boot Process of a Linux System - Baeldung
The Linux Booting Process - 6 Steps Described in Detail - freeCodeCamp.org Boot Process with Systemd in Linux - GeeksforGeeks Linux Boot Process Step-by-Step Explained - javatpoint
101-500 Exam Question 27
Which of the following commands reboots the system when using SysV init? (Choose TWO correct answers.)
Correct Answer: A,C
The shutdown command is used to bring the system down in a safe and controlled way. It can take various options and arguments, such as the time of shutdown, the message to broadcast to users, the halt or reboot mode, etc. The option -r instructs the shutdown command to reboot the system after shutting down. The argument now means to shut down immediately. Therefore, shutdown -r now will reboot the system without delay. The telinit command is used to change the run level of the system. It takes a single argument that specifies the new run level. The run level 6 is reserved for rebooting the system. Therefore, telinit 6 will also reboot the system. The other options are either incorrect or irrelevant. shutdown -r "rebooting" will also reboot the system, but with a delay of one minute and a message to the users. telinit 0 will halt the system, not reboot it. shutdown -k now "rebooting" will only send a warning message to the users, but not actually shut down or reboot the system. References: LPI Linux Essentials - 1.101.2, LPI Linux Administrator - 101.3
101-500 Exam Question 28
When using regular expressions, which of the following characters match the beginning of a line?
Correct Answer: A
When using regular expressions, the ^ character matches the beginning of a line. For example, ^Hello will match any line that starts with Hello. The ? character matches zero or one occurrence of the preceding character or group. For example, colou?r will match both color and colour. The * character matches zero or more occurrences of the preceding character or group. For example, ab*c will match ac, abc, abbc, abbbc, and so on. The + character matches one or more occurrences of the preceding character or group. For example, ab+c will match abc, abbc, abbbc, and so on, but not ac. The charactermatchestheendofaline.Forexample, World will match any line that ends with World. References: [LPI Exam 101 Detailed Objectives], Topic 103:
GNU and Unix Commands, Weight: 25, Objective 103.7: Use regular expressions with the standard Linux utilities, Regular Expressions
GNU and Unix Commands, Weight: 25, Objective 103.7: Use regular expressions with the standard Linux utilities, Regular Expressions
101-500 Exam Question 29
What is the default action of the split command on an input file?
Correct Answer: B
The split command in Linux is used to split large files into smaller files. The default action of the split command on an input file is to break the file into new files of 1,000 line pieces each. The names of the new files are PREFIXaa, PREFIXab, PREFIXac, and so on. By default, the PREFIX of the new files is x, but it can be changed with the -a option. For example, the following command will split the file someLogFile.log into new files of 1,000 lines each with the prefix log:
split someLogFile.log -a 3 log
The new files will be named logaaa, logaab, logaac, and so on. To verify the number of lines in each new file, we can use the wc command with the -l option. For example, the following command will show the number of lines in the first and the last new file:
wc -l logaaa logaas
The output will be:
1000 logaaa 170 logaas
This means that the original file had 17,170 lines and was split into 18 new files. 17 of them have 1,000 lines each, and the last one has the remaining 170 lines. 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 split and cat to split or join files.
* [Split Command in Linux: 9 Useful Examples], Topic: Split Files
split someLogFile.log -a 3 log
The new files will be named logaaa, logaab, logaac, and so on. To verify the number of lines in each new file, we can use the wc command with the -l option. For example, the following command will show the number of lines in the first and the last new file:
wc -l logaaa logaas
The output will be:
1000 logaaa 170 logaas
This means that the original file had 17,170 lines and was split into 18 new files. 17 of them have 1,000 lines each, and the last one has the remaining 170 lines. 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 split and cat to split or join files.
* [Split Command in Linux: 9 Useful Examples], Topic: Split Files
101-500 Exam Question 30
Which of the following commands replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter?
Correct Answer: D
The command that replaces each occurrence of 'bob' in the file letter with 'Bob' and writes the result to the file newletter is sed 's/bob/Bob/g' letter > newletter. This command uses the following options and syntax:
* s: Specifies the substitution operation.
* /: Separates the pattern and the replacement strings.
* bob: The pattern to be searched and replaced.
* Bob: The replacement string.
* g: The global flag that indicates all occurrences of the pattern in each line should be replaced, not just the first one.
* letter: The name of the input file.
* : Redirects the output to a file.
* newletter: The name of the output file.
The output of this command will be a new file called newletter that contains the same text as letter, except that every 'bob' is replaced by 'Bob'. For example, if the file letter contains the following text:
Dear bob, I hope this letter finds you well. I am writing to inform you that your subscription to our magazine has expired. If you wish to renew it, please send us a check for $50 by the end of this month. Otherwise, we will have to cancel your subscription and remove you from our mailing list. Thank you for your cooperation and support. Sincerely, Alice The file newletter will contain the following text:
Dear Bob, I hope this letter finds you well. I am writing to inform you that your subscription to our magazine has expired. If you wish to renew it, please send us a check for $50 by the end of this month. Otherwise, we will have to cancel your subscription and remove you from our mailing list. Thank you for your cooperation and support. Sincerely, Alice The other commands are incorrect for the following reasons:
* A. sed '/bob/Bob' letter > newletter: This command is missing the s option and the second / delimiter, and will produce an error message.
* B. sed s/bob/Bob/ letter < newletter: This command is using the wrong redirection operator (< instead of >), and will try to read the input from newletter instead of letter, and write the output to the standard output instead of newletter.
* C. sed's/bob/Bob' letter > newletter: This command is missing a space between sed and the first ', and will produce an error message.
* E. sed 's/bob, Bob/' letter > newletter: This command is using a comma (,) instead of a slash (/) as a delimiter, and will produce an error message.
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 sed to edit files in place.
How to Use the sed Command on Linux, Topic: Substituting Text.
* s: Specifies the substitution operation.
* /: Separates the pattern and the replacement strings.
* bob: The pattern to be searched and replaced.
* Bob: The replacement string.
* g: The global flag that indicates all occurrences of the pattern in each line should be replaced, not just the first one.
* letter: The name of the input file.
* : Redirects the output to a file.
* newletter: The name of the output file.
The output of this command will be a new file called newletter that contains the same text as letter, except that every 'bob' is replaced by 'Bob'. For example, if the file letter contains the following text:
Dear bob, I hope this letter finds you well. I am writing to inform you that your subscription to our magazine has expired. If you wish to renew it, please send us a check for $50 by the end of this month. Otherwise, we will have to cancel your subscription and remove you from our mailing list. Thank you for your cooperation and support. Sincerely, Alice The file newletter will contain the following text:
Dear Bob, I hope this letter finds you well. I am writing to inform you that your subscription to our magazine has expired. If you wish to renew it, please send us a check for $50 by the end of this month. Otherwise, we will have to cancel your subscription and remove you from our mailing list. Thank you for your cooperation and support. Sincerely, Alice The other commands are incorrect for the following reasons:
* A. sed '/bob/Bob' letter > newletter: This command is missing the s option and the second / delimiter, and will produce an error message.
* B. sed s/bob/Bob/ letter < newletter: This command is using the wrong redirection operator (< instead of >), and will try to read the input from newletter instead of letter, and write the output to the standard output instead of newletter.
* C. sed's/bob/Bob' letter > newletter: This command is missing a space between sed and the first ', and will produce an error message.
* E. sed 's/bob, Bob/' letter > newletter: This command is using a comma (,) instead of a slash (/) as a delimiter, and will produce an error message.
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 sed to edit files in place.
How to Use the sed Command on Linux, Topic: Substituting Text.
- Other Version
- 4107Lpi.101-500.v2022-11-30.q106
- 103Lpi.Prep4king.101-500.v2022-04-27.by.morton.131q.pdf
- 6162Lpi.101-500.v2022-02-03.q131
- 4860Lpi.101-500.v2021-10-31.q110
- 62Lpi.Prepawaytest.101-500.v2021-08-15.by.una.105q.pdf
- Latest Upload
- 112SAP.C_THR84_2505.v2026-01-12.q37
- 103Salesforce.CRT-261.v2026-01-12.q83
- 147Microsoft.SC-400.v2026-01-11.q164
- 132SAP.C_THR88_2505.v2026-01-11.q67
- 136CIPS.L4M6.v2026-01-11.q106
- 115SAP.C_S4CS_2502.v2026-01-11.q35
- 139Lpi.101-500.v2026-01-11.q128
- 110Salesforce.Health-Cloud-Accredited-Professional.v2026-01-10.q45
- 162Microsoft.AZ-900.v2026-01-10.q234
- 140VMware.3V0-32.23.v2026-01-10.q133
[×]
Download PDF File
Enter your email address to download Lpi.101-500.v2026-01-11.q128 Practice Test
