[2024年07月26日]101-500認定ガイド問題と解答トレーニング [Q77-Q94]

Share

[2024年07月26日]101-500認定ガイド問題と解答トレーニング

101-500認定お試しセット最新101-500のPDF問題集

質問 # 77
Which of the following commands redirects the output of ls to standard error?

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

正解:A


質問 # 78
The message "Hard Disk Error" is displayed on the screen during Stage 1 of the GRUB boot process. What does this indicate?

  • A. The BIOS was unable to read the necessary data from the Master Boot Record to begin the boot process
  • B. The next Stage cannot be read from the hard disk because GRUB was unable to determine the size and geometry of the disk
  • C. One or more of the filesystems on the hard disk has errors and a filesystem check should be run
  • D. The kernel was unable to execute /bin/init

正解:B

解説:
Explanation
The GRUB boot process consists of three stages1:
* Stage 1: This stage is located in the Master Boot Record (MBR) of the first hard disk or the boot sector of a partition. Its main function is to load either Stage 1.5 or Stage 22.
* Stage 1.5: This stage is located in the first 30 KB of hard disk immediately following the MBR or in the boot sector of a partition. It contains the code to access the file system that contains the GRUB configuration file. Its main function is to load Stage 22.
* Stage 2: This stage is located in an ordinary file system, usually in the /boot/grub directory. It contains the code to display the GRUB menu and to load the kernel and initrd images. It can also load additional modules to support other file systems or features2.
The message "Hard Disk Error" is displayed on the screen during Stage 1 of the GRUB boot process. This indicates that the next Stage (either Stage 1.5 or Stage 2) cannot be read from the hard disk because GRUB was unable to determine the size and geometry of the disk3. This could occur because the BIOS translated geometry has been changed by the user or the disk is moved to another machine or controller after installation, or GRUB was not installed using itself (if it was, the Stage 2 version of this error would have been seen during that process and it would not have completed the install)3.
The other options in the question are not correct because:
* A. The kernel was unable to execute /bin/init: This error would occur in Stage 2, after the kernel and initrd images are loaded, not in Stage 14.
* C. One or more of the filesystems on the hard disk has errors and a filesystem check should be run: This error would also occur in Stage 2, when GRUB tries to access the file system that contains the GRUB configuration file, not in Stage 15.
* D. The BIOS was unable to read the necessary data from the Master Boot Record to begin the boot process: This error would prevent GRUB from starting at all, not in Stage 16.
References:
1: GRUB - ArchWiki 2: GNU GRUB Manual 0.97 3: Stage1 errors - GNU GRUB Manual 0.97 4: [Kernel panic - Wikipedia] 5: [Stage2 errors - GNU GRUB Manual 0.97] 6: [Master Boot Record - Wikipedia] : How to Fix GRUB Load Errors and Recover Data? - MiniTool Home Data Recovery


質問 # 79
During a system boot cycle, what is the program that is run after the BIOS completes its tasks?

  • A. The init program
  • B. The kernel
  • C. The inetd program
  • D. The bootloader

正解:D

解説:
Explanation
The program that is run after the BIOS completes its tasks is the bootloader12. The bootloader is a small program that loads the operating system into memory and executes it. The bootloader can be located in the Master Boot Record (MBR) of the first hard disk or the boot sector of a partition for BIOS systems, or in an
.efi file on the EFI System Partition for UEFI systems12. The bootloader can also display a menu to allow the user to choose from different operating systems or kernel versions to boot12.
The other options in the question are not correct because:
* B. The inetd program: This is a program that listens for incoming network connections and launches the appropriate service for them. It is not involved in the boot process3.
* C. The init program: This is a program that is executed by the kernel as the first user-space process. It is responsible for starting and managing other processes and services. It is not run by the BIOS.
* D. The kernel: This is the core of the operating system that controls everything in the system. It is
* loaded and executed by the bootloader, not by the BIOS.
References:
1: The Linux Booting Process - 6 Steps Described in Detail - freeCodeCamp.org 2: Guide to the Boot Process of a Linux System - Baeldung 3: [inetd - Wikipedia] : [init - Wikipedia] : [Linux kernel - Wikipedia]


質問 # 80
Which of the following shell redirections will write standard output and standard error output to a file named filename?

  • A. >filename 2>&1
  • B. 1&2>filename
  • C. >>filename
  • D. 1>&2>filename
  • E. 2>&1 >filename

正解:A


質問 # 81
Which of the following settings for umask ensures that new files have the default permissions -rw-r----- ?

  • A. 0017
  • B. 0027
  • C. 0038
  • D. 0640

正解:B


質問 # 82
Regarding the command:
nice -5 /usr/bin/prog
Which of the following statements is correct?

  • A. /usr/bin/prog is executed with a priority of -5.
  • B. /usr/bin/prog is executed with a priority of 5.
  • C. /usr/bin/prog is executed with a nice level of -5.
  • D. /usr/bin/prog is executed with a nice level of 5.

正解:D

解説:
Explanation
The nice command is used to start a process with a modified scheduling priority. The scheduling priority is a value that determines how much CPU time a process will receive from the kernel. The lower the priority, the more CPU time a process will get. The priority is also known as the nice value, because a process with a high nice value is being nice to other processes by giving up CPU time. The nice value ranges from -20 to 19, with
-20 being the highest priority and 19 being the lowest. By default, processes are started with a nice value of 0, which means normal priority.
The nice command takes an optional argument -n followed by a number, which specifies the increment or decrement of the nice value from the default value of 0. For example, the command:
nice -n 5 /usr/bin/prog
will start the /usr/bin/prog process with a nice value of 5, which means a lower priority than the default.
Similarly, the command:
nice -n -5 /usr/bin/prog
will start the /usr/bin/prog process with a nice value of -5, which means a higher priority than the default. If the -n argument is omitted, the nice command will assume a default increment of 10. For example, the command:
nice /usr/bin/prog
will start the /usr/bin/prog process with a nice value of 10, which means a very low priority. Note that only the root user can start a process with a negative nice value, as this requires special privileges.
Therefore, the command:
nice -5 /usr/bin/prog
is equivalent to:
nice -n -5 /usr/bin/prog
and will start the /usr/bin/prog process with a nice value of -5, which means a higher priority than the default.
This means that the correct answer is B. /usr/bin/prog is executed with a nice level of 5.
References:
* [LPI Exam 101 Detailed Objectives], Topic 103: GNU and Unix Commands, Objective 103.6: Modify process execution priorities, Weight: 2, Key Knowledge Areas: Know the default priority of a job that is created.
* How to Set Process Priorities With nice and renice on Linux, Topic: The nice Command.


質問 # 83
In the vi editor, which of the following commands will copy the current line into the vi buffer?

  • A. yy
  • B. c
  • C. cc
  • D. 1y
  • E. 1c

正解:A


質問 # 84
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. i (lowercase)
  • B. u (lowercase)
  • C. p (lowercase)
  • D. P (uppercase)
  • E. U (uppercase)

正解:C


質問 # 85
What command changes the nice level of a running process? (Specify ONLY the command without any path or parameters)

正解:

解説:
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


質問 # 86
Which utility would be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem?

  • A. tune2fs
  • B. mod2fs
  • C. fixe2fs
  • D. mke2fs
  • E. fsck

正解:A

解説:
Explanation
The utility that can be used to change how often a filesystem check is performed on an ext2 filesystem without losing any data stored on that filesystem is tune2fs. This command can adjust various parameters of a Linux ext2, ext3, or ext4 filesystem, such as the maximum mount count, the check interval, the reserved blocks percentage, and the default mount options. To change the check interval, the -i option can be used, followed by a time value. For example, to set the check interval to 180 days for the filesystem on /dev/sda1, the following command can be used:
sudo tune2fs -i 180d /dev/sda1
This command will modify the superblock of the filesystem, which contains the metadata and configuration information, without affecting the data stored on the filesystem. The other options are incorrect because they are not suitable for changing the check interval of an ext2 filesystem. Option A is wrong because there is no such utility as mod2fs. Option B is wrong because fsck is a utility for checking and repairing filesystems, not changing their parameters. Option D is wrong because mke2fs is a utility for creating ext2 filesystems, which will erase the existing data on the partition. Option E is wrong because there is no such utility as fixe2fs.
For more information on how to use the tune2fs command, you can refer to the following articles:
* 15 tune2fs command examples in Linux [Cheat Sheet] - GoLinuxCloud
* Linux tune2fs command With Examples - GeeksforGeeks
* tune2fs command-file system management - Linuxstar
* tune2fs Command Examples - Gianforte School of Computing
* tune2fs Command - IBM


質問 # 87
When considering the use of hard links, what are valid reasons not to use hard links?

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

正解:D


質問 # 88
What of the following statements are true regarding /dev/ when using udev? (Choose TWO correct answers.)

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

正解:B、E

解説:
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


質問 # 89
In order to display all currently mounted filesystems, which of the following commands could be used? (Choose two.)

  • A. cat /proc/self/mounts
  • B. lsmounts
  • C. cat /proc/filesystems
  • D. free
  • E. mount

正解:A、E


質問 # 90
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. :e
  • B. :n
  • C. :r
  • D. :w

正解:A

解説:
Explanation
The :e command in vi is used to edit a file. If the file name is not specified, it will edit the current file. If the file has been changed by another process, the :e command will reload the file with the new content, discarding any unsaved changes made in vi. Therefore, the :e command can be used to reopen the file for editing with the new content without exiting vi. The other options are either invalid or do not perform the desired task.
The :r command is used to read the content of another file or command and insert it into the current file.
The :n command is used to edit the next file in the argument list, if any. The :w command is used to write the current file to disk, optionally with a new name. References:
* LPIC-1 Exam 101 Objectives, Topic 103: GNU and Unix Commands, 103.7 Use and edit text files
* LPIC-1 Linux Administrator 101-500 Exam FAQ, LPIC-1 Exam 101 Objectives, GNU and Unix Commands (Total Weight: 25)


質問 # 91
Which of the following kernel parameters instructs the kernel to suppress most boot messages?

  • A. nomesg
  • B. silent
  • C. verbose=0
  • D. quiet

正解:D


質問 # 92
Which command uninstalls a package but keeps its configuration files in case the package is re-installed?

  • A. dpkg -v pkgname
  • B. dpkg -L pkgname
  • C. dpkg -r pkgname
  • D. dpkg -P pkgname
  • E. dpkg -s pkgname

正解:C


質問 # 93
Running chmod 640 filea.txtas a regular user doesn't update filea.txt's permission. What might be a reason why chmod cannot modify the permissions? (Choose two.)

  • A. filea.txthas the SetUID bit set which imposes the restriction that only the rootuser can make changes to the file.
  • B. filea.txtis a hard link whose permissions are inherited from the target and cannot be set directly.
  • C. filea.txtis a symbolic link whose permissions are a fixed value which cannot be charged.
  • D. filea.txtis owned by another user and a regular user cannot change the permissions of another user's file.
  • E. filea.txthas the sticky bit set and a regular user cannot remove this permission.

正解:C、D


質問 # 94
......

ベストLpi 101-500学習ガイドと問題集は2024:https://jp.fast2test.com/101-500-premium-file.html

トップクラスLpi 101-500試験最先端学習ガイド!練習問題バージョン:https://drive.google.com/open?id=1sXrGiQIwSCTxedF7poWMj4NfMRPXx9LA


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어