CompTIA Linux+ Linux Installation and Package Management Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 CompTIA Linux+ Linux Installation and Package Management flashcards as text
Which command would verify that all files belonging to an installed RPM package have not been altered since installation?
Answer: rpm -V
`rpm -V` (verify) checks installed package files against the RPM database for changes in size, permissions, checksums, and other attributes.
Which LVM command creates a new logical volume named 'data' of 10GB from volume group 'vg0'?
Answer: lvcreate -L 10G -n data vg0
`lvcreate` creates logical volumes; -L specifies size, -n specifies the name, and the final argument is the volume group.
A technician installs a .deb package using `dpkg -i package.deb` but gets unmet dependency errors. Which command resolves these?
Answer: apt install -f
`apt install -f` (fix-broken) instructs apt to resolve and install any missing dependencies after a failed dpkg installation.
Which configuration file defines the default runlevel (or systemd target) that a Linux system boots into?
Answer: /etc/systemd/system/default.target (symlink)
On systemd systems, /etc/systemd/system/default.target is a symlink pointing to the target unit (e.g., multi-user.target or graphical.target) that boots by default.
Which command adds the Flathub repository as a remote for the current user only (not system-wide) in Flatpak?
Answer: flatpak remote-add --user flathub https://flathub.org/repo/flathub.flatpakrepo
The `--user` flag with `flatpak remote-add` adds the remote only to the current user's Flatpak installation, not system-wide.
Which swap-related command activates all swap partitions and files listed in /etc/fstab immediately?
Answer: swapon -a
`swapon -a` reads /etc/fstab and activates all entries marked with the 'swap' filesystem type.
A Linux administrator needs to convert an existing MBR disk to GPT without destroying data. Which tool is most appropriate?
Answer: gdisk with the conversion feature (or sgdisk)
gdisk can convert an MBR partition table to GPT while preserving partitions, though backups are always recommended before such operations.