Question 1
Question
What is the correct syntax to remove mypkg entirely from a Debian GNU/Linux system, including configuration file? Select one.
Answer
-
dpkg -r mypkg
-
dpkg --remove mypkg
-
dpkg --kill mypkg
-
dpkh -R mypkg
-
dpkg --purge mypkg
Question 2
Question
How can you query the RPM database for a list of all installed RPM packages? Select one
Answer
-
rpm -q
-
rpm -qa
-
rpm -a
-
rpm -al
-
rpm -qal
Question 3
Question
What will happen when rpm is launched as follows?
#rpm -Uvh file
Answer
-
The RPM file will be verified
-
An installed package may be upgraded with the version in file, with verbose output.
-
An installed package may be upgraded with the version in file, with verbose output and hash marks indicating progress.
-
An error will occur because a major mode is not specified
-
An error will occur because no file options were specified.
Question 4
Question
Which is not a valid dkpg installation command? Select one
Answer
-
dpkg -i package_file
-
dpkg -iL package_file
-
dpkg -iR packge_dir
-
dpkg -iG package_file
-
dpkg -iE package_file
Question 5
Question
Which of the following is not an advantage of a source package over a binary package?
Answer
-
A single source package can be used on multiple CPU architectures.
-
By recompiling a source package, you can sometimes work around library incompat-
ibilities.
-
You can modify the code in a source package, thus altering the behavior of a program.
-
Source packages can be installed more quickly than binary packages.
-
You may be able to recompile source code for a non-Linux Unix program on Linux.
Question 6
Question
Which is true of using both RPM and Debian package management systems on one
computer?
Answer
-
It’s generally inadvisable because the two systems don’t share installed-file database
information.
-
It’s impossible because their installed-file databases conflict with one another.
-
It causes no problems if you install important libraries once in each format.
-
It’s a common practice on Red Hat and Debian systems.
-
Using both systems simultaneously requires installing the alien program.
Question 7
Question
Which of the following statements is true about binary RPM packages that are built for a
particular distribution?
Answer
-
License requirements forbid using the package on any other distribution.
-
They may be used in another RPM-based distribution only when you set the
-- convert-distrib parameter to rpm.
-
They may be used in another RPM-based distribution only after you recompile the
package’s source RPM
-
They can be recompiled for an RPM-based distribution running on another type of
CPU.
-
They can often be used on another RPM-based distribution for the same CPU
architecture, but this isn’t guaranteed.
Question 8
Question
An administrator types the following command on an RPM-based Linux distribution:
# rpm -ivh megaprog.rpm
What is the effect of this command?
Answer
-
If the megaprog package is installed on the computer, it is uninstalled.
-
If the megaprog.rpm package exists, is valid, and isn’t already installed on the
computer, it is installed.
-
The megaprog.rpm source RPM package is compiled into a binary RPM for the
computer.
-
Nothing; megaprog.rpm isn’t a valid RPM filename, so rpm will refuse to operate on
this file.
-
The megaprog.rpm package replaces any earlier version of the package that’s already
installed on the computer.
Question 9
Question
Which of the following commands will extract the contents of the myfonts.rpm file into
the current directory?
Answer
-
rpm2cpio myfonts.rpm | cpio -i --make-directories
-
rpm2cpio myfonts.rpm > make-directories
-
rpm -e myfonts.rpm
-
alien --to-extract myfonts.rpm
-
rpmbuild --rebuild myfonts.rpm
Question 10
Question
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.)
Answer
-
yum update unzip
-
yum upgrade unzip
-
yum -u unzip
-
yum -U unzip
-
yum check-update unzip
Question 11
Question
How should you configure a system that uses Yum to access an additional Yum software
repository?
Answer
-
Edit the /etc/apt/sources.list file to include the repository site’s URL, as detailed
on the repository’s website.
-
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.
-
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.
-
Edit the /etc/yum.conf file, locate the [repos] section, and add the URL to the
repository after the existing repository URLs.
-
Edit the /etc/yum.conf file, locate the REPOSITORIES= line, and add the new
repository to the colon-delimited list on that line.
Question 12
Question
What option(s) to rpm will instruct rpm to run a verification check on all packages installed on the system?
Answer
-
rpm -verify -all
-
rpm -Va
-
rpm -qa
-
rpm -check
-
rpm -c
Question 13
Question
For distributions that use the Red Hat package management system, what command will list all packages currently installed?
Answer
-
rpm -qa
-
rpm -i
-
rpm -Uvh
-
rpm -list
-
rpm -all
Question 14
Question
for distributions that use the Red Hat package management system, what command will download and update all installed packages to he latest available version?
Answer
-
yum update
-
yum install
-
yum config
-
yum list available
-
yum download
Question 15
Question
To use dpkg to remove a package called theprogram, including its configuration files,
which of the following commands would you issue?
Question 16
Question
What is it that allows apt-cache to be done?
Answer
-
That’s intended solely to provide information about the Debian package database
-
Packet list to be installed by the operating system
-
Install the packages that run certain libraries
-
Install only using the alien converter with current kernel versions
Question 17
Question
The parameter to unpack a file in tar is:
Question 18
Question
To see a compressed file with gzip format, I use the parameter, with command gzip:
Question 19
Question
What is the preferred method of adding a directory to the library path for all users?
Answer
-
Modify the LD_LIBRARY_PATH environment variable in a global shell script.
-
Add the directory to the /etc/ld.so.conf file, and then type ldconfig.
-
Type ldconfig /new/dir, where /new/dir is the directory you want to add.
-
Create a symbolic link from that directory to one that’s already on the library path.
-
Type ldd /new/dir, where /new/dir is the directory you want to add.
Question 20
Question
What programs might you use to learn what your system’s load average is? (Select two.)