Linux Chapter 2: Exam – Flashcards

Unlock all answers in this set

Unlock answers
question
1. Which of the following is not an advantage of a source package over a binary package? A. A single source package can be used on multiple CPU architectures. B. By recompiling a source package, you can sometimes work around library incompat- ibilities. C. You can modify the code in a source package, thus altering the behavior of a program. D. Source packages can be installed more quickly than binary packages can. E. You may be able to recompile source code for a non-Linux Unix program on Linux.
answer
D
question
2. Which is true of using both RPM and Debian package management systems on one computer? A. It's generally inadvisable because the two systems don't share installed-file database information. B. It's impossible because their installed-file databases conflict with one another. C. It causes no problems if you install important libraries once in each format. D. It's a common practice on Red Hat and Debian systems. E. Using both systems simultaneously requires installing the alien program.
answer
A
question
3. Which of the following statements is true about binary RPM packages that are built for a particular distribution? A. License requirements forbid using the package on any other distribution. B. They may be used in another RPM-based distribution only when you set the --convert-distrib parameter to rpm. C. They may be used in another RPM-based distribution only after you recompile the package's source RPM. D. They can be recompiled for an RPM-based distribution running on another type of CPU. E. They can often be used on another RPM-based distribution for the same CPU architecture, but this isn't guaranteed.
answer
E
question
4. An administrator types the following command on an RPM-based Linux distribution: # rpm -ivh megaprog.rpm What is the effect of this command? A. If the megaprog package is installed on the computer, it is uninstalled. B. If the megaprog.rpm package exists, is valid, and isn't already installed on the computer, it is installed. C. The megaprog.rpm source RPM package is compiled into a binary RPM for the computer. D. Nothing; megaprog.rpm isn't a valid RPM filename, so rpm will refuse to operate on this file. E. The megaprog.rpm package replaces any earlier version of the package that's already installed on the computer.
answer
B
question
5. Which of the following commands will extract the contents of the myfonts.rpm file into the current directory? A. rpm2cpio myfonts.rpm | cpio -i --make-directories B. rpm2cpio myfonts.rpm > make-directories C. rpm -e myfonts.rpm D. alien --to-extract myfonts.rpm E. rpmbuild --rebuild myfonts.rpm
answer
A
question
6. To use dpkg to remove a package called theprogram, including its configuration files, which of the following commands would you issue? A. dpkg -e theprogram B. dpkg -p theprogram C. dpkg -r theprogram D. dpkg -r theprogram-1.2.3-4.deb E. dpkg -P theprogram
answer
E
question
7. Which of the following describes a difference between apt-get and dpkg? A. apt-get provides a GUI interface to Debian package management; dpkg doesn't. B. apt-get can install tarballs in addition to Debian packages; dpkg can't. C. apt-get can automatically retrieve and update programs from Internet sites; dpkg can't. D. apt-get is provided only with the original Debian distribution, but dpkg comes with Debian and its derivatives. E. apt-get works only with Debian-based distributions, but dpkg can work with both RPMs and Debian packages.
answer
C
question
8. What command would you type to obtain a list of all installed packages on a Debian system? A. apt-get showall B. apt-cache showpkg C. dpkg -r allpkgs D. dpkg -i E. dpkg--get-selections
answer
E
question
9. As root, you type apt-get update on a Debian system. What should be the effect of this command? A. None; update is an invalid option to apt-get. B. The APT utilities deliver information about the latest updates you've made to the APT Internet repositories, enabling you to share your changes with others. C. The APT utilities download all available upgrades for your installed programs and install them on your system. D. The APT utilities retrieve information about the latest packages available so that you may install them with subsequent apt-get commands. E. The APT utilities update themselves, ensuring you're using the latest version of APT.
answer
D
question
10. Which of the following commands would you type to update the unzip program on a Fedora system to the latest version? (Select all that apply.) A. yum update unzip B. yum upgrade unzip C. yum -u unzip D. yum -U unzip E. yum check-update unzip
answer
A, B
question
11. 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
B
question
12. 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
B
question
13. 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
D
question
14. 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
D
question
15. 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
C, D
question
16. Which of the following commands creates a display of processes, showing the parent-child relationships through links between their names? A. ps --forest B. ps aux C. ps -e D. ps --tree E. All of the above
answer
A
question
17. You use top to examine the CPU time being consumed by various processes on your system. You discover that one process, dfcomp, is consuming more than 90 percent of your system's CPU time. What can you conclude? A. Very little; dfcomp could be legitimately consuming that much CPU time, or it could be an unauthorized or malfunctioning program. B. No program should consume 90 percent of available CPU time; dfcomp is clearly mal- functioning and should be terminated. C. This is normal; dfcomp is the kernel's main scheduling process, and it consumes any unused CPU time. D. This behavior is normal if your CPU is less powerful than a 2.5GHz EM64T Pentium, but on newer systems, no program should consume 90 percent of CPU time. E. This behavior is normal if your CPU has at least four cores, but on systems with fewer cores than this, no program should consume 90 percent of CPU time.
answer
A
question
18. You type jobs at a bash command prompt and receive a new command prompt with no intervening output. What can you conclude? A. The total CPU time used by your processes is negligible (below 0.1). B. No processes are running under your username except the shell you're using. C. The jobs shell is installed and working correctly on the system. D. The system has crashed; jobs normally returns a large number of running processes. E. No background processes are running that were launched from the shell you're using.
answer
E
question
19. Which two of the following commands are equivalent to one another? (Select two.) A. nice --value 10 crunch B. nice -n -10 crunch C. nice -10 crunch D. nice 10 crunch E. nice crunch
answer
C, E
question
20. Which of the following are restrictions on ordinary users' abilities to run renice? (Select two.) A. Users may not modify the priorities of processes that are already running. B. Users may not modify the priority of their programs launched from anything but their current shells. C. Users may not decrease the priority (that is, increase the priority value) of their own processes. D. Users may not modify the priorities of other users' processes. E. Users may not increase the priority (that is, decrease the priority value) of their own processes.
answer
D, E
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New