Docsity

WGU C851 - Linux Foundations Objective Assessment, Exams of Linux skills

Toggle sidebar
bg1
Page 1 of 110
WGU C851 OA EXAM
LINUX FOUNDATIONS COMPLETE
CURRENT TESTING QUESTIONS
AND
CORRECT ANSWERS WITH RATIONALES
SECTION 1: LINUX INSTALLATION & PACKAGE MANAGEMENT
(Questions 1–45)
1. Which command displays the current Linux distribution and version
information? A) uname -a
B) lsb_release -a
C) hostname
D) uptime
Answer: B
Rationale: lsb_release -a displays Linux Standard Base (LSB) information
including distributor ID, release number, and codename.
2. Which command shows the kernel version?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download WGU C851 - Linux Foundations Objective Assessment and more Exams Linux skills in PDF only on Docsity!

WGU C851 OA EXAM

LINUX FOUNDATIONS COMPLETE

CURRENT TESTING QUESTIONS

AND

CORRECT ANSWERS WITH RATIONALES

SECTION 1: LINUX INSTALLATION & PACKAGE MANAGEMENT

(Questions 1–45)

  1. Which command displays the current Linux distribution and version information? A) uname - a B) lsb_release - a C) hostname D) uptime Answer: B Rationale: lsb_release - a displays Linux Standard Base (LSB) information including distributor ID, release number, and codename.
  2. Which command shows the kernel version?

A) uname - r B) uname - a C) Both A and B D) kernel --version Answer: C Rationale: uname - r shows only kernel release; uname - a shows all system info including kernel version.

  1. Which package manager is used by Debian-based distributions (e.g., Ubuntu, Debian)? A) rpm B) dpkg / apt C) pacman D) yum Answer: B Rationale: Debian-based: dpkg (low-level) and apt (high-level). Red Hatbased: rpm, yum, dnf.
  2. Which command installs a .deb package file manually? A) apt install file.deb B) dpkg - i file.deb C) rpm - i file.deb D) yum install file.deb Answer: B Rationale: dpkg - i (or --install) installs a Debian package file; apt handles dependencies automatically.
  3. Which command updates the package index from repositories on a Debian system?

apt Rationale: rpm - qa (query all) lists all installed RPM packages; - qi information, - ql list files, - qf query file.

  1. Which command removes a package on a Debian-based system? A) apt remove B) purge C) Both A and B (remove leaves config, purge removes config) D) apt delete Answer: C Rationale: apt remove removes binaries but leaves configuration files; apt purge removes configuration files as well.
  2. Which command searches for a package in the repositories on a Red Hatbased system? A) yum search B) dnf search C) yum whatprovides D) All of the above Answer: D Rationale: yum/dnf search searches package names/descriptions; whatprovides finds which package provides a file.
  3. Which command displays detailed information about an installed RPM package? A) rpm - qi

apt B) rpm - qa C) rpm - ql D) rpm - qf Answer: A Rationale: rpm - qi (query info) shows package description, version, architecture, installation date.

  1. Which package manager is used by Arch Linux? A) pacman B) C) yum D) zypper Answer: A Rationale: Arch Linux uses pacman (package manager) and yay (AUR helper).
  2. Which command updates all packages on an Arch system? A) pacman - Syu B) pacman - S C) pacman - R D) pacman - Q Answer: A Rationale: pacman - Syu syncs repositories (-Sy) and upgrades (-u) all packages.
  3. Which file contains the list of repositories for apt (Debian/Ubuntu)?

D) /etc/pacman.d/ Answer: B Rationale: Red Hat-based systems use .repo files in /etc/yum.repos.d/.

  1. Which command installs a local .rpm file while resolving dependencies if repositories are available? A) rpm - i (does not resolve deps) B) yum localinstall or dnf localinstall C) dpkg - i D) zypper install Answer: B Rationale: yum localinstall (or dnf install ./file.rpm) resolves dependencies from configured repositories.
  2. Which command lists all available package groups on a Red Hat system? A) yum grouplist B) yum groupinstall C) yum list groups D) yum group info Answer: A Rationale: yum grouplist (or dnf grouplist) shows package groups (e.g., "Development Tools").
  3. Which command installs a package group on a Debian-based system? A) apt install group (needs tasksel for metapackages) B) apt install ^group (metapackage)

Rationale: C) aptitude D) All of the above Answer: D Debian uses metapackages (e.g., apt install ubuntu-desktop) or tasksel.

  1. Which command rebuilds the RPM database if it becomes corrupted? A) rpm --rebuilddb B) rpm --initdb C) yum clean all D) dnf makecache Answer: A Rationale: rpm --rebuilddb rebuilds the RPM database from installed packages.
  2. Which command shows which package owns a specific file (e.g., /etc/passwd)? A) rpm - qf /etc/passwd B) dpkg - S /etc/passwd C) Both A and B D) yum provides /etc/passwd Answer: C Rationale: rpm - qf (RPM) and dpkg - S (Debian) identify the package that installed a file.
  3. Which command lists all files installed by an RPM package? A) rpm - ql

Rationale:

  1. Which command checks for broken dependencies and fixes them on a Debian system? A) apt-get install - f B) apt --fix-broken install C) dpkg --configure - a D) All of the above Answer: D apt-get install - f (fix broken) and dpkg --configure - a (configure unpacked packages) fix dependency issues.
  2. Which command is used to add a PPA (Personal Package Archive) on Ubuntu? A) add-apt-repository B) apt-add-repository C) Both A and B D) ppa-add Answer: C Rationale: add-apt-repository (or apt-add-repository) adds PPAs and imports GPG keys.
  3. Which command removes unnecessary dependencies (orphaned packages) on a Debian system? A) apt autoremove B) apt-get autoremove C) apt autoclean D) All of the above

Rationale: Answer: D Rationale: apt autoremove removes packages installed as dependencies but no longer needed.

  1. Which command clears the local repository cache on a Red Hat system? A) yum clean all B) dnf clean all C) Both A and B D) rpm --clean Answer: C yum clean all (or dnf clean all) removes cached packages and metadata.
  2. Which command lists available security updates on a Red Hat system? A) yum updateinfo B) dnf updateinfo C) yum check-update D) All of the above Answer: D Rationale: yum/dnf updateinfo lists advisories; check-update lists all available updates including security.
  3. Which command is used to enable EPEL (Extra Packages for Enterprise Linux) repository? A) yum install epel-release B) dnf install epel-release
  1. Which command lists all installed snap packages? A) snap list B) snap find C) snap info D) snap changes Answer: A Rationale: snap list displays installed snaps, versions, and channels.
  2. Which command searches for a package using dnf? A) dnf search B) dnf provides C) dnf whatprovides D) All of the above Answer: D Rationale: dnf search searches names/descriptions; provides/whatprovides finds which package includes a file.
  3. Which command shows package dependency tree for an RPM? A) rpm - qR B) yum deplist C) dnf repoquery --requires D) All of the above Answer: D Rationale: rpm - qR shows requires; yum/dnf deplist and repoquery show dependency trees.

D)

Answer

  1. Which command reinstalls a package on a Debian system? A) apt install --reinstall B) dpkg - i --force-overwrite C) Both A and B D) apt upgrade --reinstall Answer: A Rationale: apt install --reinstall reinstalls; dpkg - i with force can also reinstall.
  2. Which command verifies the integrity of all installed RPM packages? A) rpm - Va B) rpm - V all C) yum verify D) dnf verify Answer: A Rationale: rpm - Va (verify all) checks file sizes, MD5 sums, permissions, etc., against RPM database.
  3. Which command updates a single package on a Debian system? A) apt install (upgrades if already installed) B) apt upgrade C) apt-get upgrade D) apt-get install --only-upgrade Answer: A

D)

Answer D) grub-install Answer: C Rationale: update-grub is a wrapper for grub-mkconfig - o /boot/grub/grub.cfg.

  1. Which command installs GRUB to the master boot record (MBR) of /dev/sda? A) grub-install /dev/sda B) grub2-install /dev/sda (RHEL) C) Both A and B (depending on distribution)

D)

Answer install-grub /dev/sda : C Rationale: grub-install (Debian) or grub2-install (RHEL) installs GRUB to boot device.

  1. Which command lists available kernels in GRUB without rebooting? A) grep menuentry /boot/grub/grub.cfg B) grub-mkconfig | grep menuentry C) ls /boot/vmlinuz-* D) All of the above Answer: D Rationale: Listing /boot/vmlinuz-* shows installed kernels; grep on grub.cfg shows GRUB menu entries.
  2. Which command sets the default boot entry in GRUB? A) Edit GRUB_DEFAULT in /etc/default/grub, then update-grub B) grub-set-default C) Both A and B D) grub-reboot (one-time) Answer: C Rationale: GRUB_DEFAULT in /etc/default/grub; grub-set-default sets saved entry.
  3. Which command reloads systemd units without rebooting (after modifying a service file)?

D)

Answer Rationale: systemctl set-default multi-user.target changes default; init 3 works for SysV compatibility.

  1. Which command temporarily switches to graphical target without changing default? A) systemctl isolate graphical.target B) init 5 C) Both A and B systemctl start graphical.target : C Rationale: systemctl isolate switches runlevels temporarily; init 5 works for SysV compatibility. SECTION 2: LINUX FILE SYSTEMS & HIERARCHY (Questions 46–105)
  2. Which directory contains device files (e.g., /dev/sda)? A) /dev B) /etc C) /proc D) /sys Answer: A Rationale: /dev contains device special files (block/character devices) managed by udev.
  3. Which directory contains system configuration files?

D)

Answer A) /bin B) /etc C) /home D) /var Answer: B Rationale: /etc stores configuration files (passwd, ssh, network, etc.).

  1. Which directory contains user home directories? A) /usr B) /home C) /root