Which of the following settings for umaskensures that new files have the default permissions -rw-r-----?
Correct Answer: D
Question 107
What is the name of the main configuration file for GNU GRUB? (Specify the file name only without any path.)
Correct Answer: C
Explanation The main configuration file for GNU GRUB is grub.cfg, which is usually located in /boot/grub/ or /boot/grub2/ depending on the distribution. This file contains the menu entries for the boot loader, each with a title, a kernel image, an initrd image, and optional parameters. The grub.cfg file is not meant to be edited manually, as it is generated by the grub-mkconfig command, which reads the settings from /etc/default/grub and the scripts in /etc/grub.d/. The /etc/default/grub file contains the global options for GRUB, such as the default menu entry, the timeout, the theme, etc. The /etc/grub.d/ directory contains executable scripts that are run by grub-mkconfig to generate the menu entries for each operating system or kernel found on the system. For example, the script 10_linux generates the entries for the Linux kernels installed by the package manager, while the script 30_os-prober generates the entries for other operating systems detected on the system, such as Windows. To make changes to the GRUB configuration, one should edit the /etc/default/grub file and/or the scripts in /etc/grub.d/, and then run grub-mkconfig -o /boot/grub/grub.cfg to update the grub.cfg file. References: * 2, 102.2 Install a boot manager * 4, 102.2 Install a boot manager * man grub-mkconfig
Question 108
Creating a hard link to an ordinary file returns an error. What could be the reason for this?
Correct Answer: E
Explanation The most likely reason for getting an error when creating a hard link to an ordinary file is that the source and the target are on different filesystems. A hard link is a directory entry that points to the same inode as the original file. An inode is a data structure that stores the metadata and location of a file on a filesystem. A hard link cannot span across different filesystems because each filesystem has its own inode table and numbering scheme. Therefore, a hard link can only refer to a file that exists on the same filesystem as the link. This is mentioned in the article by How-To Geek1 and the man page of ln2. The other options are not valid reasons for getting an error when creating a hard link. The source file being hidden, read-only, or a shell script does not affect the ability to create a hard link, as long as the user has the appropriate permissions. The source file being already a hard link also does not prevent creating another hard link to the same file, as long as the maximum number of links per inode is not exceeded. This is explained in the article by Linuxize3 and the man page of ln
Question 109
What is the first program that is usually started, at boot time, by the Linux kernel when using SysV init?
Correct Answer: D
Question 110
Which of the following commands lists the dependencies of the RPM package file foo.rpm?