Ubuntu linux 3C

Ace your homework & exams now with Quizwiz!

Question 54 Which dpkg option completely removes a package and its configuration files? -r --configure -R -P

-P Explanation The dpkg command installs Debian packages on Debian distributions. The dpkg -P completely uninstall the package including the configuration files. Be aware of the other following options: ##MARGINS=16,8,O,O##- --configure reconfigures an unpacked package. ##MARGINS=16,O,O,O##- -r removes the package but does not delete the configuration files. ##MARGINS=16,O,O,O##- -p lists information about a currently installed Debian package. ##MARGINS=16,O,O,O##- -i installs a package. ##MARGINS=16,O,O,O##- -I lists information about packages that are not installed. ##MARGINS=16,O,O,O##- -I displays all packages with names that match a specified pattern. ##MARGINS=16,O,O,O##- -L shows the installed files for a package. ##MARGINS=16,O,O,O##- -S finds a package associated with specified files. ##MARGINS=16,O,O,O##- -C searches for packages that have been installed only partially on the system. ##MARGINS=16,O,O,O##- B disables packages that have dependencies on the package being removed. ##MARGINS= 16,0,0,0##- --ignore-depends ignores dependency-checking for specified packages. ##MARGINS=16,O,O,O##- -no-act prevents changes from being written. ##MARGINS=16,O,O,O##- -G prevents a package from being installed if a newer version of the package already exists on the computer. ##MARGINS=16,O,O,O##- -E does not install the package if the same version of the package is already installed. ##MARGINS=16,O,O,O##- -R command installs the package recursively

Question 70 Which dpkg option installs a package recursively? -r --configure -R -P

-R Explanation The dpkg command installs Debian packages on Debian distributions. The dpkg -R command installs the package recursively. Be aware of the other following options: ##MARGINS=16,8,0,0## --configure reconfigures an unpacked package. ##MARGINS=16,0,0,0## -r removes the package but does not delete the configuration files. ##MARGINS=16,0,0,0## -P completely uninstalls the package including the configuration files. ##MARGINS=16,0,0,0## -p lists information about a currently installed Debian package. ##MARGINS=16,0,0,0## -i installs a package. ##MARGINS=16,0,0,0## -I lists information about packages that are not installed. ##MARGINS=16,0,0,0## -I displays all packages with names that match a specified pattern. ##MARGINS=16,0,0,0## -L shows the installed files for a package. ##MARGINS=16,0,0,0## -S finds a package associated with specified files. ##MARGINS=16,0,0,0## -C searches for packages that have been installed only partially on the system. ##MARGINS=16,0,0,0## B disables packages that have dependencies on the package being removed. ##MARGINS= 16,0,0,0## --ignore-depends ignores dependency-checking for specified packages. ##MARGINS=16,0,0,0## -no-act prevents changes from being written. ##MARGINS=16,0,0,0## -G prevents a package from being installed if a newer version of the package already exists on the computer. ##MARGINS=16,0,0,0## -E does not install the package if the same version of the package is already installed.

Question 75 Which of the following directories must remain on the same partition? (Select three.) /usr /etc /Iib /home /bin

/etc /Iib /bin Explanation /etc, /bin, /sbin, /Iib, and /dev must all be on the same partition. These directories have system configuration files which are necessary for Linux to function properly. ##MARGINS=16,8,0,0##. The /etc directory contains configuration files specific to the system. ##MARGINS=16,0,0,0##. The /bin directory contains binary commands that are available to all users. ##MARGINS=16,0,0,0##. The /sbin directory contains system binary commands. ##MARGINS=16,0,0,0##. The /Iib directory contains shared program libraries and kernel modules. ##MARGINS=16,0,0,0##. The /dev directory contains device files. /home and /usr should be placed on separate partitions if possible. The /usr contains system commands and utilities. The / home directory contains by default the user home directories.

Question 67 When managing YUM, where should you place .repo files? (Tip: Enter the full path to the file.)

/etc!Yum.repos.d/ Explanation Yellowdog Updater Modified (YUM) uses /etc/yum.repos.d/ to keep a .repo file for each Internet repository. An internet repository contains packages for Linux systems. To change where Linux looks for new or updated packages, you can add .repo files to the /etc/yum.repos.d/ directory.

Question 51 What is the full path for the Yellowdog Updater Modified (YUM) configuration file? (Tip: Enter the full path.)

/etc/YUm.conf Explanation Yellowdog Updater Modified (YUM) uses /etc/yum.conf as the configuration file. The configuration file contains: ##MARGINS=16,S,0,0## URLs of RPM repositories. ##MARGINS=16,0,0,0## Directories where it saves downloaded packages. ##MARGINS=16,0,0,0## Locations of logs.

Question 64 Which directories typically hold the dynamic libraries on your system? (Select two.) /usr/local/lib/ /Iib/ld.so/ /usr/lib/ /etc/ld.so.conf/

/usr/local/lib/ /usr/lib/ Explanation Dynamic libraries are typically stored in /usr/lib/ and /usr/local/lib/. Dynamic libraries are not integrated into the code of the application. /Iib/ld.so is a program (not a directory) which finds and loads the shared libraries needed by a program. /etc/ld.so.conf contains a colon, space, tab, newline, or comma-delimited list of directories in which to search for libraries.

Question 53 Which of the following directories should be on separate partitions? (Select two.) /var /bin /Iib /home

/var /home Explanation When planning the partitions on the Linux system, consider creating separate partitions for the following directories: ##MARGINS=16,8,O,O##. /home contains by default the user home directories. ##MARGINS=16,O,O,O##. /var contains data files that change constantly. ##MARGINS=16,O,O,O##. /boot contains the kernel and boot loader files. ##MARGINS=16,O,O,O##. /opt contains the additional programs on the system. ##MARGINS=16,O,O,O##. /tmp contains temporary files created by programs during system use. ##MARGINS=16,O,O,O##. /usr contains system commands and utilities. The /bin directory contains binary commands that are available to all users. The /Iib directory contains shared program libraries and kernel modules. Both /bin and /Iib should be located on the root partition.

Question 69 Which directory contains data files that change constantly, including e-mail, print jobs, and proxy cache files? (Tip: Enter the full path to the directory.)

/var Explanation The /var directory contains data files that change constantly. Standard subdirectories include: ##MARGINS=16,8,0,0## /var/mail holds e-mail in boxes ##MARGINS=16,0,0,0## /var/spool holds files waiting for processing, such as print jobs or scheduled jobs ##MARGINS=16,0,0,0## /var/www holds www or proxy cache files

Question 73 How many primary partitions can you create on a single hard disk drive? 4 2 Unlimited 8

4 Explanation There can be a maximum of four primary partitions on a single hard disk drive. A partition is a logical division of a storage device associated with a hard disk drive. A primary partition is one that is used to store the operating system. Primary partitions: ##MARGINS=16,8,O,O##- Can hold operating system boot files. ##MARGINS=16,0,0,0##. Cannot be further subdivided into logical drives. ##MARGINS=16,0,0,0##. Can be formatted.

Question 56 You have compiled a new kernel. When you reboot, the new kernel is not shown on the boot menu. You use the GRUB boot loader. What might you need to do to fix the problem? Recompile the kernel. Edit the grub.conf file to add the new kernel. Switch to the LILO boot loader. Reinstall the GRUB boot loader.

Edit the grub.conf file to add the new kernel. Explanation It may be necessary to edit /boot/grub/grub.conf to manually add the new kernel to the menu. Switching to LILO or reinstalling GRUB will not help since the problem is a missing entry in a configuration file. It is possible, but unlikely, that the kernel was made but the make file did not update the configuration file. Compiling the kernel again may work only if a step was missed.

Question 65 Drag the term on the left to match the characteristics on the right. (Tip: You may use the terms more than once.) Drag Zone Drop Zone Dynamic Library Has a .so or .so.version extension - Dynamic Library Static Library Increase the size of the application - Static Library Has an .a filename extension- Static Library Are typically stored in /usr/lib/ and /usr/local/lib/ - Dynamic Library Can degrade program load time if the library isn't already in use by another program - Dynamic Library

Explanation Dynamic libraries are not integrated into the code of the application. Dynamic libraries: ##MARGINS=16,8,0,0##. Have a .so or .so.version extension (.so stands for shared object). ##MARGINS=16,0,0,0##. Are typically stored in /usr/lib/ and /usr/local/lib/. ##MARGINS=16,0,0,0##. Can degrade program load time if the library isn't already in use by another program. ##MARGINS=16,0,0,0##. Are similar to Dynamic Link Libraries (DLLs) in Windows. Static libraries are integrated into the code of the application when the code is compiled. Static Libraries: ##MARGINS=16,8,0,0##. Have an .a filename extension. ##MARGINS=16,0,0,0##. Are used when dynamic libraries are not available. ##MARGINS=16,0,0,0##. Increase the size of the application.

Question 55 You are working with the following RPM package: acroread-8.1.3-S1.6.iS86.rpm. Drag the naming convention term on the left to match the items on the right. Drag Zone Drop Zone Release number i586 Architecture type Package name 8.1.3 Version number Architecture type acroread Package name Version number 51.6 Release number

Explanation RPM uses a standard naming convention. The syntax is packagename-version-release.architecture.rpm. For example, acroread-8.1.3-51.6.i586.rpm means the following:

Question 57 You are installing a boot loader on a system that will boot both Linux and Windows. You are going to use the GRUB boot loader for Linux. Where is the best location for GRUB? Pick the most correct answer. GRUB should be installed on a floppy disk. GRUB should be installed on the boot sector of the Linux partition. GRUB should be installed on the MBR of the first fixed disk. You can't use GRUB in a Windows/Linux environment.

GRUB should be installed on the boot sector of the Linux partition Explanation In a mixed as environment GRUB should be installed in the Linux partition not the MBR where it can be overwritten.

Question 52 Which of the following commands reloads the libraries for the /bin/bash executable, but does not update the cache? Idconfig -N /bin/bash Idconfig -x /bin/bash Idd /bin/bash Idd -v /bin/bash

Idconfig -N /bin/bash Explanation The Idconfig reloads the library cache every time you add or remove libraries, and to update the symbolic links. Be aware of the following options Idconfig options: ##MARGINS=16,8,O,O##. -N updates symbolic links, but does not update the cache. ##MARGINS=16,O,O,O##. -x updates the cache but does not update symbolic links. The Idd command displays which libraries are used by another library (i.e., library dependencies). Be aware of the following options Idd options: ##MARGINS=16,8,O,O##. -v displays all information. ##MARGINS=16,O,O,O##. --version displays the version number of Idd. ##MARGINS=16,O,O,O##. -u displays unused direct dependencies.

Question 71 What command should you use to change the location of the default file used to search for libraries? Idconfig -p Idconfig -n Idconfig -f Idconfig -r

Idconfig -f Explanation Use the Idconfig -f command to change the configuration file from the jetcjld.so.conf default. /etc/ld.so.conf contains a colon, space, tab, newline, or comma-delimited list of directories in which to search for libraries. Be aware of the other Idconfig options: ##MARGINS=16,8,0,0## -v summarizes the directories and files it is registering as it reloads the cache. ##MARGINS=16,0,0,0## -N updates symbolic links, but does not update the cache. ##MARGINS=16,0,0,0## -n updates the links contained in the directories specified on the command line. ##MARGINS=16,0,0,0## -X updates the cache but does not update symbolic links. ##MARGINS=16,0,0,0## -C changes the cache location for the /etc/ld.so.cache default. ##MARGINS=16,0,0,0## -r treats a new directory as if were the root directory. This is helpful when you are recovering a badly corrupted system or installing a new OS. ##MARGINS=16,0,0,0## -p displays the current library cache, including all the library directories and their respective libraries.

Question 62 You have a system with two installed operating systems. You have already configured the GRUB bootloader to manage which operating system is loaded by default and how long to display the two operating system choices when the system boots up. Now you need to prevent all users (except for you) from making changes to the second operating system in the GRUB menu and restrict users from booting to the second operating system. The users should boot the system using the first listed operating system. What should you do? (Select two. Each answer is a required part of the solution.) Insert the lock option into the /boot/grub/grub.conf file for both operating systems. Insert the lock option into the /boot/grub/grub.conf file for the second operating system. Insert the password option into the /boot/grub/grub.conf file before the listed operating systems. Change the root line in the /boot/grub/grub.conf file for the second operating system.

Insert the lock option into the /boot/grub/grub.conf file for the second operating system. Insert the password option into the /boot/grub/grub.conf file before the listed operating systems. Explanation To prevent all users (except for you) from making changes to the GRUB menu when the system boots, you should: ##MARGINS=16,8,0,0##. Insert the password option before the listed operating systems. ##MARGINS=16,0,0,0##. Insert the lock option for the second operating system to prevent users from making changes to the operating system in the GRUB menu and restrict them from booting to the operating system. Inserting the lock option for both operating systems would prevent users from booting into the first operating system as well. The root line for the operating system entries specifies the location of the root file system (i.e., root (hdO,O)).

Question 66 Which environment variable specifies additional directories to search for library files not listed in /etc/ld.so.conf?

LD_LIBRARY_PATH Explanation Use the LD_LIBRARY_PATH environment variable to specify additional directories to search for library files not listed in /etc/ Id.so.conf.

Question 61 What is the result of the apt-get -d command? Package installation is simulated without an actual installation. The package database is checked for consistency and errors. Packages are downloaded to the system, but not installed. All installed packages are upgraded to the latest versions in with the information in /etc/apt/sources.list.

Packages are downloaded to the system, but not installed. Explanation The apt-get command downloads and installs packages. The apt-get -d command downloads packages without installing them. apt-get upgrade upgrades all installed packages to the latest versions in accordance with the information in /etc/apt/ sources.list. apt-get -check checks the package database for consistency and errors. apt-get -s simulates package installation without doing an actual install.

Question 68 What is the purpose of the dpkg --configure command? Uninstall the package including the configuration files. Ignore dependency-checking for specified packages. Reconfigure an unpacked package. Install a package if the same version is not already installed.

Reconfigure an unpacked package. Explanation The dpkg command installs Debian packages on Debian distributions. The dpkg --configure reconfigures an unpacked ##MARGINS=16,8,0,0## -r removes the package but does not delete the configuration files. ##MARGINS=16,0,0,0## -P completely uninstalls the package including the configuration files. ##MARGINS=16,0,0,0## -p lists information about a currently installed Debian package. ##MARGINS=16,0,0,0## -i installs a package. ##MARGINS=16,0,0,0## -I lists information about packages that are not installed. ##MARGINS=16,0,0,0## -I displays all packages with names that match a specified pattern. ##MARGINS=16,0,0,0## -L shows the installed files for a package. ##MARGINS=16,0,0,0## -5 finds a package associated with specified files. ##MARGINS=16,0,0,0## -C searches for packages that have been installed only partially on the system. ##MARGINS=16,0,0,0## B disables packages that have dependencies on the package being removed. ##MARGINS= 16,0,0,0## --ignore-depends ignores dependency-checking for specified packages. ##MARGINS=16,0,0,0## -no-act prevents changes from being written. ##MARGINS=16,0,0,0## -G prevents a package from being installed if a newer version of the package already exists on the computer. ##MARGINS=16,0,0,0## -E does not install the package if the same version of the package is already installed. ##MARGINS=16,0,0,0## -R installs the package recursively.

Question 58 You have made changes to the LILO configuration file. What, if anything, is the next step? The second step is to configure the grub.conf file. Run the fdisk /mbr command to reset the boot record. Run the command /sbin/lilo to reset the boot record. The configuration LILO is complete.

Run the command /sbin/lilo to reset the boot record Explanation After you make changes to the /etc/lilo.conf file you need to run the lilo program to reset the boot record. The grub.conf file is used by the GRUB boot loader not LILa. Fdisk /mbr is a DOS command and if you ran the command it would write a DOS master boot record.

Question 63 What is the purpose of the rpm -v command? Check the authenticity of the RPM package. Update an installed RPM package to the newest version. Verify that an RPM package is free from errors. Test an RPM package for uninstalled dependencies without actually installing it.

Verify that an RPM package is free from errors. Explanation The rpm -v command verifies that packages are free from errors. rpm -v performs an MDS checksum on the package. RPM only gives output when packages have errors. If errors are present, the command displays the error code and the file name. rpm -U updates an installed package to the newest version. rpm --checksig checks the authenticity of the package. The option checks the package's digital signing key against the package to ensure it has not been altered. rpm --test tests a package for uninstalled dependencies without actually installing it.

Question 59 Which of the following statements correctly describe the differences between the apt-get remove and apt-get --purge commands? (Select two.) apt-get remove leaves the package installed, but removes the configuration files. apt-get --purge removes the package and the configuration files. apt-get --purge removes a specified package, but leaves the configuration files. apt-get remove removes a specified package, but leaves the configuration files.

apt-get --purge removes the package and the configuration files. apt-get remove removes a specified package, but leaves the configuration files. Explanation apt-get remove removes a specified package, but leaves the configuration files. apt-get --purge removes the package and the configuration files.

Question 74 You have installed a package called mathpac with apt-get. After a system upgrade, the package is not working correctly. Which command is the most correct option to get the package to work? rpm -u math pac apt-get update math pac apt-get upgrade math pac apt-get dist-upgrade mathpac

apt-get upgrade math pac Explanation The upgrade option will insure all dependencies are met when the latest version is installed. update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/ apt/sources.list. The rpm -U mathpac may work with apt-get versions specific for rpm based distributions but not all distributions use rpm for package management. dist-upgrade, in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages. apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones, if necessary. This should not be used to casually upgrade a single package.

Question 72 Which command will query the system for all installed RPM packages? rpm -qa rpm -nodeps rpm-U rpm -ihv

rpm -qa Explanation The rpm -qa command queries all installed RPM packages on the system. Use the rpm utility to install RPM packages including their dependencies. Be aware of the other rpm options: ##MARGINS=16,8,O,O##- --nodeps installs the package without checking for dependencies. This is not recommended. ##MARGINS=16,O,O,O##- -U updates an installed package to the newest version. ##MARGINS=16,O,O,O##- -i installs a package. Use the entire package filename when installing. ##MARGINS=16,O,O,O##- -h prints hash marks as the package archive is unpacked. ##MARGINS=16,O,O,O##- -v displays a verbose version of the installation. ##MARGINS=16,O,O,O##- --rebuilddb rebuilds the database indices from the installed package headers. ##MARGINS=16,O,O,O##- --initdb creates a new database. ##MARGINS=16,O,O,O##- --checksig checks the authenticity of the package. The option checks the packages digital signing key against the package to insure it has not been altered. ##MARGINS=16,O,O,O##- --test tests a package for uninstalled dependencies without actually installing it. ##MARGINS=16,O,O,O##- --force installs the package, regardless of whether a newer version of the package is already installed. Package files overwrite files from previously installed packages, or if the package replaces other installed packages. ##MARGINS=16,O,O,O##- -e uninstalls (i.e., erases) a package. To uninstall a package, use the package name, not the file name. If dependencies exist, the dependent packages must first be removed. ##MARGINS=16,O,O,O##- -v verifies that packages are free from errors. RPM only gives output when packages have errors. If errors are present, the command displays the error code and the file name. ##MARGINS=16,O,O,O##- -F upgrades the package, but only if an earlier version currently exists on the system.

Question 60 Which apt-get option upgrades all installed packages to the latest versions in with the information in /etc/apt/sources.list?

upgrade Explanation apt-get upgrade upgrades all installed packages to the latest versions in accordance with the information in /etc/apt/ sources.list. The apt-get command downloads and installs packages on a Debian distribution. apt-get: ##MARGINS=16,8,O,O##- Is similar to the yum utility on an RPM distribution. ##MARGINS=16,O,O,O##- Gets its information about the application repositories from the /etc/apt/sources.list file.


Related study sets

Chapter 12: Nursing Management During Pregnancy (Chapter Worksheet)

View Set

NUR 301 Exam 1 TestBank Questions

View Set

Unit 93: Relative clauses 2: with and without who/taht/which

View Set