Home
51.
Which command enables you to show all installed packages using the yum command?
  • A.
    yum show
  • B.
    yum show all
  • C.
    yum list
  • D.
    yum list all
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
The yum list all command shows installed packages and packages that are available in the repositories. The question was how to show installed packages (not all packages), which is why answer C is the correct answer.
Report
Name Email  
52.
Which command enables you to find out the yum ID number that is needed to roll back a command that was issued with yum?
  • A.
    yum show all
  • B.
    yum show recent
  • C.
    yum show history
  • D.
    yum history
  • Answer & Explanation
  • Report
Answer : [D]
Explanation :
The yum history command reads the /var/log/yum.log file and shows recent yum history. In this list, every event is marked with a history number that can be used with the yum history undo command.
Report
Name Email  
53.
Which command should you use to install an RPM file that has been downloaded to your computer?
  • A.
    yum install
  • B.
    yum localinstall
  • C.
    rpm -ivh
  • D.
    rpm -Uvh
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
The yum install command installs individually downloaded RPM files while looking for package dependencies in the current repositories. This is better than using rpm -ivh , which does not consider the yum repositories. In earlier versions of RHEL, the yum localinstall command was used to install packages that were downloaded to the local file system, but this command is now deprecated.
Report
Name Email  
54.
Which command enables you to find the RPM a specific file belongs to?
  • A.
    rpm -ql /bin/file
  • B.
    rpm -qlf /bin/file
  • C.
    rpm -qf /bin/file
  • D.
    rom -qa /bin/file
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
Use the rpm -qf command to find which RPM package a specific file comes from.
Report
Name Email  
55.
Which command enables you to analyze whether there are scripts in an RPM package file that you have just downloaded?
  • A.
    rpm -qs packagename.rpm
  • B.
    rpm -qps packagename.rpm
  • C.
    rpm -qp --scripts packagename.rpm
  • D.
    rpm -q --scripts packagename.rpm
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
The --scripts option checks whether there are scripts in an RPM package. If you want to query the package file and not the database of installed RPMs, you need to add the -p option to the -q option, which is used to perform RPM queries.
Report
Name Email