Home
You may like this!
26.
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 & Explanation
  • Report
Answer : [E]
Explanation :
An uppercase -P invokes the purge operation, which completely removes a package and its configuration files, so option E is correct. The -e parameter uninstalls a package for rpm, but not for dpkg, so option A is incorrect. The lowercase -p causes dpkg to print information about the package’s contents, so option B is incorrect. The -r parameter removes a package but leaves configuration files behind, so options C and D are both incorrect. (Option D also specifies a complete filename, which isn’t used for removing a package—you should specify only the shorter package name.)
Report
Name Email  
27.
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 & Explanation
  • Report
Answer : [C]
Explanation :
You can specify Debian package archive sites in /etc/apt/sources.list, and then you can type apt-get update and apt-get upgrade to quickly update a Debian system to the latest packages, so option C is correct. GUI package management tools for Debian and related distributions exist, but they aren’t apt-get, so option A is incorrect. The alien program can convert a tarball and install the converted package on a Debian system, but apt-get can’t do this, so option B is incorrect. dpkg and apt-get both come with all Debian-based distributions, so option D is incorrect. The dpkg program can install only Debian packages on Debian-based systems, but apt-get can work with both package systems, so option E is backward.
Report
Name Email  
28.
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 & Explanation
  • Report
Answer : [E]
Explanation :
The --get-selections action to dpkg displays the names of all installed packages, making option E correct. There is no showall option to apt-get, so option A is incorrect. The showpkg subcommand to apt-cache displays information about a named package; when used without a package name, as in option B, it displays no data. The dpkg -r action removes a package, so option C would remove the package called allpkgs if it were installed. The dpkg -i action installs a package, so option D is incorrect—and that option doesn’t list a package name, which the -i action requires.
Report
Name Email  
29.
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 & Explanation
  • Report
Answer : [D]
Explanation :
The update option to apt-get causes retrieval of new information, as described in option D. This option is perfectly valid, contrary to option A’s assertion. The apt-get program doesn’t permit you to upload information to the Internet repositories, so option B is incorrect. Option C describes the effect of the upgrade or dist-upgrade options, not the update option. The upgrade or dist-upgrade options can upgrade APT itself, but update alone won’t do the job, so option E is incorrect.
Report
Name Email  
30.
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.
  • D.
    yum -U unzip
  • E.
    yum check-update unzip
  • Answer & Explanation
  • Report
Answer : [A, B]
Explanation :
The yum utility’s update and upgrade options are nearly identical in effect, and either can be used to upgrade an individual package, such as unzip, so options A and B are both correct. The primary command options to yum don’t use dashes, so options C and D are both incorrect. The check-update option to yum checks for the availability of updates but does not install them, so option E is incorrect.
Report
Name Email