Linux LPI 117-101 # 3 Of 9

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Tobyyy
T
Tobyyy
Community Contributor
Quizzes Created: 10 | Total Attempts: 1,461
| Attempts: 179 | Questions: 60
Please wait...
Question 1 / 60
0 %
0/100
Score 0/100
1. Which utility can be used to convert a .rpm package to .deb package
format? (Without arguments)

Explanation

alien is a program that converts between Redhat rpm, Debian deb, Stampede slp,
Slackware tgz, and Solaris pkg file formats. If you want to use a package from another
linux distribution than the one you have installed on your system, you can use alien to
convert it to your preferred package format and install it. It also supports LSB packages.

Submit
Please wait...
About This Quiz
System Administration Quizzes & Trivia

This quiz, titled 'Linux LPI 117-101 # 3 of 9', assesses advanced Linux system administration skills. It covers operations like unpacking archives, updating tar files, and installing utilities, essential for Linux professionals.

Personalize your quiz and earn a certificate with your name on it!
2. Type in the command line to upgrade a package using the apt-get command. The
package name is package1.

Explanation

Updating Information on Available Packages
To update information on available packages, issue the following command:
apt-get updateInstalling a PackageTo install a specified package, issue the following
command:apt-get install packagewhere package specifies the name of the package to be
installed.Upgrading Installed PackagesTo automatically upgrade all installed packages to
the latest available version, issue the following command:apt-get upgrade package

Submit
3.  Which of the following commands can be used to create a tar archive file in verbose
mode?

Explanation

To create a tar file with verbose mode
tar -cvf tarfilename sourcefiles
Some Common Options:
c Create a tar file
t Test a tar file
x Extract a tar file
v Verbose
f Tar Filename

Submit
4.  You wish to install a package named package.deb using the apt-get tool. Type the
simplest command line to do this.

Explanation

To install the package using apt-get command

Submit
5. The ______ command is typically used to search files for a specified string.

Explanation

grep command prints lines of files where pattern is matched.
Eg: grep root /etc/passwd à will display all lines from /etc/paswd matching the root pattern.

Submit
6. While installing from source code you don't see the configuration script. What
command can you run to compile the code?

Explanation

The purpose of the make utility is to determine automatically which
pieces of a large program need to be recompiled, and issue the commands to recompile
them. example C programs, since they are most common, but you can use make with any
programming language whose compiler can be run with a shell command. In fact, make
is not limited to programs. You can use it to describe any task where some files must be
updated automatically from others whenever the others change.
To prepare to use make, you must write a file called the makefile that describes the
relationships among files in your program, and the states the commands for updating
each file. In a program,typically the executable file is updated from object files, which
are in turn
made by compiling source files.
So, make command compile the source code.

Submit
7. You want to install a new software package, but it is only available in
RPM format and you are running Debian Linux. Which of the following
would help you to install it on your system?

Explanation

alien is a program that converts between Redhat rpm, Debian deb,
Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a
package from another linux distribution than the one you have installed on your
system, you can use alien to convert it to your preferred package format and install
it. It also supports LSB packages.

Submit
8. Which of the following commands can be used to extract a tar file?

Explanation

tar -xvf tarfile
Some Common Options:
c Create a tar file
t Test a tar file
x Extract a tar file
v Verbose
f Tar Filename

Submit
9. Type in the command to update the apt-get database with new or updated packages.

Explanation

Updating Information on Available Packages
To update information on available packages, issue the following command:
apt-get updateInstalling a PackageTo install a specified package, issue the following
command:apt-get install packagewhere package specifies the name of the package to be
installed.Upgrading Installed PackagesTo automatically upgrade all installed packages to
the latest available version, issue the following command:apt-get upgrade package

Submit
10. What is filename including full path, of the file used to configure library path
settings for a system?

Explanation

/etc/ld.so.conf File containing a list of colon, space, tab, newline, or comma
spearated directories in which to search for libraries. So you should specify the full path
the libraries in /etc/ld.so.conf file.

Submit
11. What environment variable will set the path for added libraries?

Explanation

the LD_LIBRARY_PATH environmental variable set the path for
added libraries. You can display environmental varialble using env command.

Submit
12. To what environment variable will you assign or append a value if
you need to tell the dynamic linker to look in a build directory for some
of a program's shared libraries?

Explanation

the LD_LIBRARY_PATH environmental variable set the path for
added libraries. You can display environmental varialble using env command.

Submit
13. What command will display the needed libraries for the program myprog1 to run?

Explanation

ldd command prints the shared libraries required by each program or
shared library specified on the command line.

Submit
14. You wish to install a debian package using dpkg called debianpackage.deb. Give the
simplest command line to do this.

Explanation

There are two different options -i or -install. Convention is short option starts from - and
long option starts from -- .
If you have a package file containing a package you want to install, the simplest way to
install the package is to use the dpkg command:
dpkg --install packagefile
where packagefile stands for the name of the package file, which generally ends with the
characters .deb. If all the prerequisite packages have already been installed and if the
package does not conflict with any installed packages, the command will unpack the
package files, move them to their proper locations, and execute the scripts necessary to
configure the package.

Submit
15. What RPM command would show you detailed information for a package called
openssh-3.6.i386.rpm?

Explanation

-qi option queried and display the information about the package.

Submit
16. After a minor security incident you are instructed by your lead sys-admin to verify the
RPM's installed on a running system. Which command will create a complete report which you can analyze for changes which may be security related?

Explanation

Verifying a package compares information about the installed files in
the package with information about the files taken from the package metadata
stored in the rpm database. Among other things, verifying compares the size, MD5
sum, permissions, type, owner and group of each file. Any discrepancies are
displayed.
To verify the package:
rpm -Va or -verify -a packagename

Submit
17.  What operation of the make utility cannot normally be performed as a normal user?

Explanation

make install or install command creates/writes the files or directory on
different directory. To write or to create user required write permission to parent
directory. Generally, normal users doesn't have write permission to system
directory.

Submit
18. You want to find out what files are contained in a tar file. How would you do this?

Explanation

To test the tar files by displaying the contents of tar file use the -t or
--list option on tar command.
Example: tar -t tarfilename.tar

Submit
19. User Joseph has successfully extracted and compiled a program from
source code. Installing the binaries produces errors. What is the most
likely reason?

Explanation

The most likely reason for the errors occurring during the installation of the binaries is that they require root privileges to be installed. Root privileges are necessary for certain system-level operations, such as modifying system directories or accessing restricted resources. Without the proper permissions, the installation process may encounter errors and fail to complete successfully.

Submit
20. On boot, your system shows messages that mention library file errors. What
command should you type (command only) to attempt to fix the library errors?

Explanation

ldconfig command is used to configure dynamic linker run time
bindings

Submit
21. Type the shortest command including switches, to remove the installed Redhat
 Package named packagename from the system.

Explanation

rpm -e packagename

Submit
22. What tool can you use to print shared library dependencies?

Explanation

Explanation: ldd command prints the shared libraries required by each program or
shared library specified on the command line.
Example: ldd libdb.so.3
libc.so.6 => /lib/tls/libc.so.6 (0x00237000)
/lib/ld-linux.so.2 (0x0021e000)

Submit
23. What is the full path including the filename of the configuration file that stores the
locations of all library files on the system?

Explanation

ldconfig creates the necessary links and cache to the most recent
shared libraries found in the directories specified on the command line, in the file
/etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by
the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and file names of
the libraries it encounters when determining which versions should have their links
updated.
Some files:
/lib/ld.so run-time linker/loader
/etc/ld.so.conf File containing a list of colon, space, tab, newline, or comma spearated
directories in which to search for libraries.
/etc/ld.so.cache File containing an ordered list of libraries found in the directories
specified in /etc/ld.so.conf.

Submit
24. What is the correct syntax to remove Certkiller entirely from a Debian System
including configuration files?

Explanation

To remove an installed package, use the command
dpkg --remove package à this command does not remove package configuration files,
which may facilitate subsequent re-installation of the package. If you want to remove the
configuration files as well, use the command:
dpkg --purge package

Submit
25. You have a package called debianpkg.deb and wish to convert it to an rpm.
Type the command line that will do this for you including switches.

Explanation

Debian Linux generally uses .deb format packages and Redhat uses .rpm format packages. There is a command named alien used to convert .deb to

Submit
26.   You are compiling some software from source. After running ./configure with the
   appropriate arguments and no errors, what is the next command to run?

Explanation

The purpose of the make utility is to determine automatically which
pieces of a large program need to be recompiled, and issue the commands to recompile
them. example C programs, since they are most common, but you can use make with any
programming language whose compiler can be run with a shell command. In fact, make
is not limited to programs. You can use it to describe any task where some files must be
updated automatically from others whenever the others change.
To prepare to use make, you must write a file called the makefile that describes the
relationships among files in your program, and the states the commands for updating
each file. In a program, typically the executable file is updated from object files, which
are in turn
made by compiling source files.

Submit
27. What file is read by the program ldconfig?


  

Explanation

ldconfig creates the necessary links and cache to the most recent shared libraries
found in the directories specified on the command line, in the file /etc/ld.so.conf, and
in the trusted directories (/lib and /usr/lib). The cache is used by the run-time linker,
ld.so or ld-linux.so. ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links updated.
Some files:
/lib/ld.so run-time linker/loader
/etc/ld.so.conf File containing a list of colon, space, tab, newline, or comma spearated
directories in which to search for libraries.
/etc/ld.so.cache File containing an ordered list of libraries found in the directories
specified in /etc/ld.so.conf.

Submit
28. Type the command line including switches to convert and install a Redhat package
named package.rpm on a Debian system?

Explanation

Redhat packages are in .rpm format and debian packages are in .deb
format. To convert or to install the .rpm packages on debian linux:
alien -i or --install package.rpm

Submit
29. Which utility can you call to find out what shared libraries a program is using?

Explanation

ldd command prints the shared libraries required by each program or
shared library specified on the command line.
Example: ldd libdb.so.3
libc.so.6 => /lib/tls/libc.so.6 (0x00237000)
/lib/ld-linux.so.2 (0x0021e000)

Submit
30. You are preparing a new set of shared libraries in /usr/local/applib and you have
written and compiled some code that uses these libraries. You have already
performed and ldconfig, however the system still cannot find the shared libraries.
What is most likely the cause of this?
          

Explanation

/etc/ld.so.conf File containing a list of colon, space, tab, newline, or comma
spearated directories in which to search for libraries. So you should specify the path the
libraries in /etc/ld.so.conf file.

Submit
31. What is the name and full path to the location of the dpkg database?

Explanation

Local database is maintain in debian as well as in redhat. /var/lib/dpkg
is the local package database for debian linux and /var/lib/rpm for redhat.

Submit
32. How can you list files owned by a specific .deb package?

Explanation

To list the files installed from a specified package, issue the command:
dpkg --listfiles package or dpkg -L package

Submit
33. What command will uninstall a package but leave its configuration
Files in case a package is re-installed?

Explanation

To remove an installed package, use the command
dpkg --remove package or dpkg -r packageThis command does not remove package
configuration files, which may facilitate subsequent re-installation of the package. If you
want to remove the configuration files as well, use the command:dpkg --purge package

Submit
34. What would the command "rpm --allmatches rpmname" do?

Explanation

Remove all versions of the package which match PACKAGE_NAME

Submit
35.  What is a reasonable command to uninstall a Debian package from
 your system?

Explanation

dpkg ?r | ??remove
Remove an installed package. ?r or ??remove remove everything except configuration
files. This may avoid having to reconfigure the package if it is reinstalled later.

Submit
36. What is the difference between the -remove and the -purge action with the dpkg
command?

Explanation

-r or --remove remove everything except configuration files. This
may avoid having to reconfigure the package if it is reinstalled later. (Configuration
files are the files listed in the debian/conffiles control file). ?P or ??purge removes
everything, including configuration files. If -a or --pending is given instead of a package name, then all packages unpacked, but marked to be removed or purged in file /var/lib/dpkg/status, are removed or purged, respectively.

Submit
37. What will happen when the following command is issued?
rpm -Uvh file

Explanation

This upgrades or installs the package currently installed to a newer
version. It checks either old version is installed or not, if installed then it will
upgrade to newer and install new if not installed.

Submit
38. Type the command line that will list information, and all file locations on the
installed package mypackage?

Explanation

Some common options of rpm command
-i or --install à Install the New package
-U or --upgrade à Upgrade the Package
-e or --erase à Remove the package
-q or --query à Query the package
-qi à Query the information of package
-ql àQuery and list all files belongs to package. Multiple options can be combined on single - and order can be different.

Submit
39. Type the simplest command with switches to unpack a compressed archive named
file1.tar.gz?

Explanation

Generally files will archive using tar command. To archive tar cvf tarfilename.tar source files To extract from the tar archive file: tar xvf tarfilename.tar
In QUESTION showing the file archived as well as compressed using gzip command.
We can archive as well as compress at one time using:
tar -czfv tarfilename.cgz or first create the archive file and then compress using gzip or gzip2 command.
To extract :
tar -zxf filename
or
uncompress the file : gunzip compressedfile
extract from the tar. tar xvf tarfile.

Submit
40. You want to add files to a previously created tar file. You want to replace existing
files with newer files, how can you do this?

Explanation

To append the newer or updated files only on existing tar file either use the -u or --update option on tar command
Example: tar -u tarfilename.tar sourcefile

Submit
41.  Which TWO of the following commands allows you to manage .deb packages?

Explanation

dselect - console Debian package handling frontend
dpkg - package manager for Debian

Submit
42. You are about to install a new program on an RPM based Linux system.
Which of the following would be the best way to accomplish this?

Explanation

rpm command is used to install, upgrade or uninstall the rpm format package.

Submit
43. Which system administration command you can use to update ld.so.cache after the
installation of new shared libraries?

Explanation

ldconfig creates the necessary links and cache to the most recent
shared libraries found in the directories specified on the command line, in the file
/etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by
the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and file names of
the libraries it encounters when determining which versions should have their links
updated.

Submit
44. While installing an application from source code you don't see the
configure script. What command can you run to compile the code?

Explanation

The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to

Submit
45. What happens when ldconfig is executed?

Explanation

ldconfig creates the necessary links and cache to the most recent
shared libraries found in the directories specified on the command line, in the file
/etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib). The cache is used by
the run-time linker, ld.so or ld-linux.so. ldconfig checks the header and file names of
the libraries it encounters when determining which versions should have their links
updated.

Submit
46. What is the location including the full path to where apt-get stores its downloaded
packages?

Explanation

atp-get command stores the downloaded packages on
/var/cache/atp/archives

Submit
47. You need to know where all the configuration files for the installed package named
"postfix" are located. Assuming it was installed with rpm, which command will list this information for you?

Explanation

To list the configuration files of installed package: rpm -qc or -q
--configfiles packagename. To list all belongs to installed package: rpm -ql or -q
--list packagename

Submit
48. Which RPM command would produce the following output
Name : xwhois Relocations: (not relocatable)
Version : 0.3.7 Vendor: Certkiller
Release : 1 Build Data: Fri 06 Aug 1999 09:29:07 AM EDT
Install date: (not installed) Build Host:
desktop.infohvy.com
Group : Application/Internet Source RPM: (none)
Size : 74057 License: GPL
Packager : Ryan Weaver
URL : https://www.goatnet.ml.org/software.html
Summary : X Windows Whois Tool
Description: xwhois is a small and fast query tool for the
whois service. (rfc954)
xwhois-0.3.7.tar.gz
xwhois.spec

Explanation

he output is information of xwhois package. To display the
information about the package, we use the -qi option.

Submit
49. After a minor security incident you are instructed by your lead sys-admin to verify
the RPM's installed on running system. Which command will create a complete
report which you can analyze for changes which may be security related?

Explanation

Verifying a package compares information about the installed files in the package with information about the files taken from the package metadata
stored in the rpm database. Among other things, verifying compares the size, MD5
sum, permissions, type, owner and group of each file. Any discrepancies are
displayed.
To verify the package:
rpm -Va or -verify -a packagename

Submit
50. How do you get a list of files that have been installed from a dpkg package?

Explanation

To list the files installed from a specified package, issue the command: dpkg --listfiles package or dpkg -L package

Submit
51. What are the default permissions on the Debian /etc/passwd file?

Explanation

The default permission of /etc/passwd file is:
-rw-r--r--
In Here read and write to owner user, read only to group member and others.
Numerical value of Read 4
Numerical value of Write 2
Numerical value of Execute 1
So default permission is 644

Submit
52. You need to remove the rpm package Certkiller regardless of dependencies, type the
command with switches that will do this?

Explanation

To remove the package we can use the -e or --erase option. To remove
or install or upgrade the package without checking the dependencies -nodeps option
is used.
So,
rpm -e --nodeps Certkiller
rpm -erase nodeps Certkiller

Submit
53. How do you use dpkg to verify the status of an installed package Certkiller pkg? Select
two.

Explanation

To verify the install packages on debian linux either -s or --status
options is used.

Submit
54. What are the default permissions on the Debian /etc/shadow file?

Explanation

The default permission of /etc/shadow file is:
-r--------
In Here read only to owner user and no permission to others.
Numerical value of Read 4
Numerical value of Write 2
Numerical value of Execute 1
So default permission is 400

Submit
55. How can you update a package only if an earlier version is currently installed on the
system?

Explanation

Upgrades, but only if the package installed.

Submit
56.  You want to add information to a previously created tar file. How would you do
 this?

Explanation

To append the new file at the end of existing tar file use either -r or
--append option.
Example:
tar -r tarfilename.tar newfilename

Submit
57. Which pair of dpkg options are equivalent and what do they do?

Explanation

To check the partially installed packages: package -C or --audit packagename

Submit
58. You want to examine the changelog for the installed package "postfix".
Which command will display the changelog?

Explanation

To query the changelog of installed package:
rpm -q --changelog packagename

Submit
59. You have not run apt-get, on a system for some time, but it has been
run on the system before. What apt-get command would you run to
download the latest list of packages, but not the packages themselves?

Explanation

To automatically upgrade all installed packages to the latest available
version, issue the following command:
apt-get upgrade

Submit
60. Type the simplest RPM command to list where the package file Certkiller.rpm will
install its files

Explanation

Some common options of rpm command
-i or --install à Install the New package
-U or --upgrade à Upgrade the Package
-e or --erase à Remove the package
-q or --query à Query the package
-qi à Query the information of package
-ql àQuery and list all files belongs to package. Multiple options can be combined on single - and order can be different.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 30, 2009
    Quiz Created by
    Tobyyy
Cancel
  • All
    All (60)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which utility can be used to convert a .rpm package to .deb...
Type in the command line to upgrade a package using the apt-get...
 Which of the following commands can be used to create a tar...
 You wish to install a package named package.deb using the...
The ______ command is typically used to search files for a specified...
While installing from source code you don't see the configuration...
You want to install a new software package, but it is only available...
Which of the following commands can be used to extract a tar file?
Type in the command to update the apt-get database with new or updated...
What is filename including full path, of the file used to configure...
What environment variable will set the path for added libraries?
To what environment variable will you assign or append a value ifyou...
What command will display the needed libraries for the program myprog1...
You wish to install a debian package using dpkg called...
What RPM command would show you detailed information for a package...
After a minor security incident you are instructed by your lead...
 What operation of the make utility cannot normally be performed...
You want to find out what files are contained in a tar file. How would...
User Joseph has successfully extracted and compiled a program...
On boot, your system shows messages that mention library file errors....
Type the shortest command including switches, to remove the installed...
What tool can you use to print shared library dependencies?
What is the full path including the filename of the configuration file...
What is the correct syntax to remove Certkiller entirely from a Debian...
You have a package called debianpkg.deb and wish to convert it to an...
  You are compiling some software from source....
What file is read by the program ldconfig?  
Type the command line including switches to convert and install a...
Which utility can you call to find out what shared libraries a program...
You are preparing a new set of shared libraries in /usr/local/applib...
What is the name and full path to the location of the dpkg database?
How can you list files owned by a specific .deb package?
What command will uninstall a package but leave its configurationFiles...
What would the command "rpm --allmatches rpmname" do?
 What is a reasonable command to uninstall a Debian package...
What is the difference between the -remove and the -purge action with...
What will happen when the following command is issued?rpm -Uvh file
Type the command line that will list information, and all file...
Type the simplest command with switches to unpack a compressed archive...
You want to add files to a previously created tar file. You want to...
 Which TWO of the following commands allows you to manage .deb...
You are about to install a new program on an RPM based Linux...
Which system administration command you can use to update ld.so.cache...
While installing an application from source code you don't see...
What happens when ldconfig is executed?
What is the location including the full path to where apt-get stores...
You need to know where all the configuration files for the installed...
Which RPM command would produce the following outputName : xwhois...
After a minor security incident you are instructed by your lead...
How do you get a list of files that have been installed from a dpkg...
What are the default permissions on the Debian /etc/passwd file?
You need to remove the rpm package Certkiller regardless of...
How do you use dpkg to verify the status of an installed package...
What are the default permissions on the Debian /etc/shadow file?
How can you update a package only if an earlier version is currently...
 You want to add information to a previously created tar file....
Which pair of dpkg options are equivalent and what do they do?
You want to examine the changelog for the installed package...
You have not run apt-get, on a system for some time, but it has...
Type the simplest RPM command to list where the package file...
Alert!

Advertisement