31.
How should you configure a system that uses Yum to access an additional Yum software
repository?
- A.Edit the /etc/apt/sources.list file to include the repository site’s URL, as detailed on the repository’s Web site.
- B.Download a package from the repository site and install it with RPM, or place a configuration file from the repository site in the /etc/yum.repos.d directory.
- C.Use the add-repository subcommand to yum or the Add Repository option in the File menu in yumex, passing it the URL of the repository.
- D.Edit the /etc/yum.conf file, locate the [repos] section, and add the URL to the repository after the existing repository URLs.
- E.Edit the /etc/yum.conf file, locate the REPOSITORIES= line, and add the new repository to the colon-delimited list on that line.
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
Yum uses files in the /etc/yum.repos.d directory to locate its repositories, so you can add to the repository list by adding files to this subdirectory, as option B specifies, typically either by installing an RPM or by adding a file manually. Option A describes a method of adding a repository to a computer that uses APT, not Yum. Option C’s add-repository subcommand is fictitious. Although the /etc/yum.conf file described in options D and E is real, it doesn’t store repository data. |
32.
What is the preferred method of adding a directory to the library path for all users?
- A.Modify the LD_LIBRARY_PATH environment variable in a global shell script.
- B.Add the directory to the /etc/ld.so.conf file, and then type ldconfig.
- C.Type ldconfig /new/dir, where /new/dir is the directory you want to add.
- D.Create a symbolic link from that directory to one that’s already on the library path.
- E.Type ldd /new/dir, where /new/dir is the directory you want to add.
- Answer & Explanation
- Report
Answer : [B]
Explanation :
Explanation :
The /etc/ld.so.conf file holds the global library path, so editing it is the preferred approach. You must then type ldconfig to have the system update its library path cache. Thus, option B is correct. Although you can add a directory to the library path by altering the LD_LIBRARY_PATH environment variable globally, as in option A, this approach isn’t the preferred one, so this option is incorrect. Option C simply won’t work. Option D also won’t work, although linking individual library files would work. This method isn’t the preferred one for adding a whole directory, though. The ldd utility displays information on libraries used by executable files, so option E won’t have the desired effect. |
33.
You prefer the look of GTK+ widgets to Qt widgets, so you want to substitute the
GTK+ libraries for the Qt libraries on your system. How would you do this?
- A.You must type ldconfig --makesubs=qt,gtk. This command substitutes the GTK+ libraries for the Qt libraries at load time.
- B.You must uninstall the Qt library packages and re-install the GTK+ packages with the --substitute=qt option to rpm or the --replace=qt option to dpkg.
- C.You must note the filenames of the Qt libraries, uninstall the packages, and create symbolic links from the Qt libraries to the GTK+ libraries.
- D.You can’t easily do this; libraries can’t be arbitrarily exchanged for one another. You would need to rewrite all the Qt-using programs to use GTK+.
- E.You must reboot the computer and pass the subst=qt,gtk option to the kernel. This causes the kernel to make the appropriate substitutions.
- Answer & Explanation
- Report
Answer : [D]
Explanation :
Explanation :
Libraries are selected by programmers, not by users or system administrators. If you don’t like the widgets provided by one library, you have few options, and option D is correct. (Many widget sets do provide a great deal of configurability, though, so you may be able to work around the problem in other ways.) Options A, B, and E describe fictitious options to ldconfig, rpm, dpkg, and the kernel. Option C wouldn’t work; Qt-using programs would crash when they found GTK+ libraries in place of the Qt libraries they were expecting. |
34.
A user types kill -9 11287 at a bash prompt. What is the probable intent, assuming the
user typed the correct command?
- A.To cut off a network connection using TCP port 11287
- B.To display the number of processes that have been killed with signal 11287 in the last nine days
- C.To cause a server with process ID 11287 to reload its configuration file
- D.To terminate a misbehaving or hung program with process ID 11287
- E.To increase the priority of the program running with process ID 11287
- Answer & Explanation
- Report
Answer : [D]
Explanation :
Explanation :
The kill program accepts various signals in numeric or named form (9 in this example) along with a process ID number (11287 in this example). Signal 9 corresponds to SIGKILL, which is an extreme way to kill processes that have run out of control. Thus, option D describes the effect of this command. Although you might use kill to kill network processes, you can’t pass kill a TCP port number and expect it to work, so option A is incorrect. The program also won’t display information about the number of processes that have been killed, making option B incorrect. To do as option C suggests, you’d need to tell kill to pass SIGHUP (signal 1), so the command would be kill -1 11287, and option C is incorrect. The kill program can’t change the priority of a process, so option E is incorrect. |
35.
What programs might you use to learn what your system’s load average is? (Select two.)
- A.ld
- B.load
- C.top
- D.uptime
- E.la
- Answer & Explanation
- Report
Answer : [C, D]
Explanation :
Explanation :
The top utility displays a dynamic list of processes ordered according to their CPU use along with additional system information, including load averages, so option C is correct. If you want only the load average at a specific moment, uptime (option D) may be better because it presents less extraneous information—it shows the current time, the time since the system was booted, the number of active users, and the load averages. Option A’s ld command has nothing to do with displaying load averages (it’s a programming tool that links together program modules into an executable program). There are no standard Linux programs called load (option B) or la (option E). |