exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 73 discussion

Actual exam question from CompTIA's XK0-004
Question #: 73
Topic #: 1
[All XK0-004 Questions]

A junior systems administrator is upgrading a package that was installed on a Red Hat-based system. The administrator is tasked with the following:
✑ Update and install the new package.
✑ Verify the new package version is installed.
Which of the following should be done to BEST accomplish these task? (Choose two.)

  • A. yum install <package name>
  • B. yum upgrade
  • C. rpm ג€"e <package name>
  • D. rpm ג€"qa
  • E. apt-get <package name>
  • F. apt-get upgrade
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️
Reference:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Akobulife
Highly Voted 4 years ago
Since the package is already installed on the machine, I am of the opinion that yum upgrade will be used. then rpm -qa used for query. that is BD
upvoted 8 times
...
SriAri
Most Recent 1 year, 4 months ago
A and D is Correct Answer [AD]
upvoted 1 times
...
RichardJRL
3 years ago
Another ambiguous question. Select either (A or B) and D as the least worst options. A. 'yum install [packagename]' will not work to upgrade the package if the package is already installed. It just exits saying nothing to do package already installed, even if you've done a yum check-upgrade and can see an newer version of the package is available. You either need to supply the specific newer version number as a suffix to the package name or use the command 'yum install --best [packagename]' to update the package to whatever the latest version available is. B. 'yum upgrade' will upgrade all packages for which newer versions are available, which is not exactly was asked for. 'yum upgrade [packagename]' would accomplish what was asked by updating only the named package (and any of its dependencies). C. uninstalls (e=erase) the named package. Not correct. D. 'rpm -qa' displays ALL installed packages and their versions. It works but is messy. Instead 'rpm -q [packagename]' will display the version of the package requested and nothing more. E/F. apt-get is the wrong tool here.
upvoted 2 times
examtopics_htc
2 years, 6 months ago
Yeah, D is a mean-spirited answer. It should be `rpm -q <package name>` since that's how everyone and their dog checks if a RPM was installed. `rpm -qa` makes little to no sense if you have hundreds of RPMs installed. I was thinking it'd be `rpm -e <package name>` because I had no idea what -e did, it just looked more right to me than the nonsense that is using `rpm -qa` to check for a single RPM. If I had experienced this same question on the test without having experienced it here first, I would've gotten it wrong. Mean.
upvoted 1 times
...
...
MeisAdriano
3 years, 1 month ago
Selected Answer: AB
strange task "-update and install- the new package" A. yum install <package name> => valid because yum is used on RedHat and respect the task "install new package version" B. yum upgrade => valid because check if new package version is installed, if not upgrade it. C. rpm -e <package name> => is for RedHat-like but not valid because: -e means erase D. rpm -qa => is for RedHat-like but not valid because: -qa means query all. Display list ALL installed packages E. apt-get <package name> => not valid because is for Debian-like ( similar to rpm to manage .rpm but using .deb files) F. apt-get upgrade => not valid because is for Debian-like ( similar to rpm to manage .rpm but using .deb files)
upvoted 2 times
...
betty_boop
4 years, 4 months ago
https://www.cyberciti.biz/howto/question/linux/linux-rpm-cheat-sheet.php
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago