1Which of the following commands is used to install a specific RPM package file named package.rpm while displaying a progress bar and verbose output?
A.rpm -qa package.rpm
B.rpm -ivh package.rpm
C.rpm -e package.rpm
D.rpm -V package.rpm
Correct Answer: rpm -ivh package.rpm
Explanation:The -i flag installs the package, -v enables verbose output, and -h displays hash marks (progress bar).
Incorrect! Try again.
2In a Red Hat-based system, which configuration directory contains the .repo files that define where the package manager looks for software?
A./etc/sysconfig/network-scripts/
B./etc/yum.repos.d/
C./etc/rpm/macros/
D./var/lib/rpm/
Correct Answer: /etc/yum.repos.d/
Explanation:The /etc/yum.repos.d/ directory contains configuration files ending in .repo that define the repositories for YUM and DNF.
Incorrect! Try again.
3What is the primary difference between yum and dnf in modern Linux distributions?
A.dnf is the successor to yum, offering better dependency resolution and performance.
B.yum supports .deb files while dnf supports .rpm files.
C.dnf can only compile from source, whereas yum installs binaries.
D.yum is used for kernels only, while dnf is for user-space applications.
Correct Answer: dnf is the successor to yum, offering better dependency resolution and performance.
Explanation:DNF (Dandified YUM) is the next-generation version of YUM, utilizing the libsolv library for faster and more accurate dependency resolution.
Incorrect! Try again.
4Which command allows a system administrator to search for a package description containing the term 'httpd' in a YUM/DNF repository?
A.dnf find httpd
B.dnf search httpd
C.rpm -search httpd
D.yum query httpd
Correct Answer: dnf search httpd
Explanation:The search subcommand in DNF or YUM searches package names and summaries for the specified keyword.
Incorrect! Try again.
5When using rpm, which command allows you to query all installed packages to verify if a specific software is present?
A.rpm -qa
B.rpm -all
C.rpm -list
D.rpm -check
Correct Answer: rpm -qa
Explanation:rpm -qa queries (-q) all (-a) installed packages on the system.
Incorrect! Try again.
6Which low-level tool is used to manage .deb packages in Debian-based systems?
A.apt
B.apt-get
C.dpkg
D.synaptic
Correct Answer: dpkg
Explanation:dpkg is the low-level package manager for Debian systems, used to install, remove, and provide information about .deb packages. apt acts as a higher-level front-end.
Incorrect! Try again.
7Which command updates the local database of available packages from the repositories defined in /etc/apt/sources.list?
A.apt-get upgrade
B.apt-get install
C.apt-get update
D.apt-get dist-upgrade
Correct Answer: apt-get update
Explanation:apt-get update resynchronizes the package index files from their sources, allowing the system to know about new and updated packages.
Incorrect! Try again.
8You need to remove a package named apache2 on a Debian system along with its configuration files. Which command should you use?
A.apt remove apache2
B.apt purge apache2
C.dpkg -r apache2
D.apt clean apache2
Correct Answer: apt purge apache2
Explanation:While remove deletes the binaries, purge removes the package and its associated configuration files.
Incorrect! Try again.
9If a Debian package installation fails due to missing dependencies, which command attempts to correct the system state by installing the missing dependencies?
A.apt --fix-broken install
B.apt-get check
C.dpkg --configure -a
D.apt update --force
Correct Answer: apt --fix-broken install
Explanation:The --fix-broken (or -f) option in apt attempts to correct a system with broken dependencies.
Incorrect! Try again.
10When compiling software from source code, what is the purpose of the ./configure script?
A.It compiles the source code into binary files.
B.It installs the binaries to the target directory.
C.It checks the local system environment for dependencies and creates a Makefile.
D.It downloads the source code from the internet.
Correct Answer: It checks the local system environment for dependencies and creates a Makefile.
Explanation:The configure script scans the system to ensure required libraries exist and generates a Makefile tailored to the specific system configuration.
Incorrect! Try again.
11Which standard command is used to read the instructions in a Makefile and compile the source code?
A.compile
B.build
C.make
D.install
Correct Answer: make
Explanation:The make utility automatically builds executable programs and libraries from source code by reading files called Makefiles.
Incorrect! Try again.
12Which directory is the standard location for source code when manually compiling software for all users on a Linux system?
A./bin/src
B./usr/local/src
C./etc/src
D./var/src
Correct Answer: /usr/local/src
Explanation:The Filesystem Hierarchy Standard (FHS) designates /usr/local/src as the location for source code being built for local installation.
Incorrect! Try again.
13Which utility is primarily used to download files from the web via the command line, supporting HTTP, HTTPS, and FTP protocols?
A.cat
B.wget
C.less
D.ping
Correct Answer: wget
Explanation:wget is a non-interactive network downloader used to retrieve files from the web.
Incorrect! Try again.
14Which command is used to extract the contents of a compressed archive named software.tar.gz?
A.tar -cvf software.tar.gz
B.tar -xvf software.tar.gz
C.gzip -d software.tar.gz
D.unzip software.tar.gz
Correct Answer: tar -xvf software.tar.gz
Explanation:The flags -x (extract), -v (verbose), and -f (filename) are used with tar. The z flag (often implied or added as -xzvf) handles the gzip compression.
Incorrect! Try again.
15What is the primary benefit of running software in a 'sandbox' environment like Firejail or using Flatpaks?
A.It increases the execution speed of the application.
B.It isolates the application from the rest of the system to improve security.
C.It allows the application to bypass user permissions.
D.It recompiles the kernel for the application.
Correct Answer: It isolates the application from the rest of the system to improve security.
Explanation:Sandboxing restricts what resources (files, networks, etc.) an application can access, preventing malicious or buggy software from harming the host system.
Incorrect! Try again.
16Which of the following package formats is known for being a 'universal' package that bundles all dependencies and runs isolated from the OS?
A..rpm
B..deb
C.Snap
D.Tarball
Correct Answer: Snap
Explanation:Snap (and Flatpak) packages are containerized software packages that include their dependencies, allowing them to run across different Linux distributions consistently.
Incorrect! Try again.
17Which command allows you to verify the integrity of a downloaded file using a SHA-256 hash?
A.checkhash file.iso
B.sha256sum file.iso
C.verify file.iso
D.md5 file.iso
Correct Answer: sha256sum file.iso
Explanation:sha256sum calculates and checks the SHA-256 message digest, ensuring the file has not been corrupted or tampered with.
Incorrect! Try again.
18In the context of storage, what is a GUID Partition Table (GPT) primarily designed to overcome compared to MBR?
A.The inability to use SSDs.
B.The limit of 4 primary partitions and disk sizes larger than 2 TiB.
C.The lack of support for Linux filesystems.
D.The inability to boot from a network.
Correct Answer: The limit of 4 primary partitions and disk sizes larger than 2 TiB.
Explanation:MBR is limited to disks under and 4 primary partitions. GPT supports essentially unlimited partitions and zettabyte-scale disks ( blocks).
Incorrect! Try again.
19Which directory in the Linux filesystem hierarchy contains device files representing storage hardware?
A./mnt
B./media
C./dev
D./proc
Correct Answer: /dev
Explanation:The /dev directory contains special device files, such as /dev/sda or /dev/nvme0n1, representing hardware components.
Incorrect! Try again.
20Which command displays the amount of disk space used and available on currently mounted filesystems in a human-readable format?
A.du -h
B.df -h
C.ls -lh
D.free -h
Correct Answer: df -h
Explanation:df stands for 'disk free'. The -h flag makes the output human-readable (e.g., displaying sizes in GB or MB).
Incorrect! Try again.
21What is the function of the /etc/fstab file?
A.It logs filesystem errors.
B.It stores the partition table layout of the disk.
C.It configures how filesystems and partitions are automatically mounted at boot.
D.It lists currently loaded kernel modules.
Correct Answer: It configures how filesystems and partitions are automatically mounted at boot.
Explanation:The File System Table (fstab) contains information about filesystems that the system should mount automatically upon startup.
Incorrect! Try again.
22Which command is used to create an ext4 filesystem on a specific partition, such as /dev/sdb1?
A.fdisk /dev/sdb1
B.mkfs.ext4 /dev/sdb1
C.mount -t ext4 /dev/sdb1
D.fsck.ext4 /dev/sdb1
Correct Answer: mkfs.ext4 /dev/sdb1
Explanation:mkfs (make filesystem) is used to format a partition. Specifically, mkfs.ext4 formats it with the ext4 filesystem.
Incorrect! Try again.
23What is the purpose of the mount command?
A.To format a disk.
B.To attach a filesystem found on a device to the main directory tree.
C.To physically eject a drive.
D.To partition a hard drive.
Correct Answer: To attach a filesystem found on a device to the main directory tree.
Explanation:Mounting is the process of making a filesystem available to the operating system by attaching it to a specific point (mount point) in the directory structure.
Incorrect! Try again.
24Which LVM (Logical Volume Manager) component is the physical storage device (disk or partition) initialized for use by LVM?
A.Logical Volume (LV)
B.Volume Group (VG)
C.Physical Volume (PV)
D.Physical Extent (PE)
Correct Answer: Physical Volume (PV)
Explanation:A Physical Volume (PV) is the base LVM component, usually a hard disk or partition, initialized with pvcreate.
Incorrect! Try again.
25Which command is used to expand a Logical Volume to use all remaining free space in its Volume Group?
A.lvextend -l +100%FREE /dev/vg/lv
B.lvresize --max /dev/vg/lv
C.vgextend /dev/vg/lv
D.pvcreate /dev/vg/lv
Correct Answer: lvextend -l +100%FREE /dev/vg/lv
Explanation:lvextend increases the size of a logical volume. The -l +100%FREE flag instructs it to utilize all available free space in the volume group.
Incorrect! Try again.
26What is 'Swap' space in Linux?
A.A backup partition for system files.
B.An area on the disk used as virtual memory when physical RAM is full.
C.A temporary storage for downloaded packages.
D.A specialized filesystem for Docker containers.
Correct Answer: An area on the disk used as virtual memory when physical RAM is full.
Explanation:Swap acts as an overflow for RAM. When memory is full, inactive pages are moved to swap space on the disk to free up physical memory.
Incorrect! Try again.
27Which command is used to initialize a partition as swap space?
A.mkfs.swap
B.mkswap
C.swapon
D.fdisk
Correct Answer: mkswap
Explanation:mkswap sets up a Linux swap area on a device or file. swapon is then used to enable it.
Incorrect! Try again.
28You try to unmount a directory, but receive a 'device is busy' error. Which command helps identify which user or process is using the device?
A.whoami
B.lsof
C.ps -aux
D.top
Correct Answer: lsof
Explanation:lsof (List Open Files) can show which processes have open files on a specific mount point, helping diagnose why a device is busy.
Incorrect! Try again.
29Which RAID level provides data redundancy by mirroring data identically across two or more drives?
A.RAID 0
B.RAID 1
C.RAID 5
D.RAID 10
Correct Answer: RAID 1
Explanation:RAID 1 writes the exact same data to two or more drives (mirroring), ensuring data survives if one drive fails.
Incorrect! Try again.
30What is the main difference between a Hard Link and a Soft (Symbolic) Link?
A.Soft links point to the inode number; Hard links point to the file path.
B.Hard links point to the inode number; Soft links point to the file path.
C.Hard links can span across different filesystems; Soft links cannot.
D.There is no functional difference.
Correct Answer: Hard links point to the inode number; Soft links point to the file path.
Explanation:A hard link is a direct reference to the physical data (inode). A soft link is a special file that contains the path to another file. Consequently, hard links cannot span partitions.
Incorrect! Try again.
31Which command creates a symbolic link named linkname pointing to targetfile?
A.ln targetfile linkname
B.ln -s targetfile linkname
C.link targetfile linkname
D.cp -s targetfile linkname
Correct Answer: ln -s targetfile linkname
Explanation:The ln command creates links. The -s flag specifies that it should be a symbolic (soft) link.
Incorrect! Try again.
32Which filesystem repair tool is used to check and repair inconsistent filesystems (often requiring the disk to be unmounted)?
A.chkdisk
B.fsck
C.repairfs
D.mount -fix
Correct Answer: fsck
Explanation:fsck (File System Consistency Check) is used to check and optionally repair one or more Linux filesystems.
Incorrect! Try again.
33What is an Inode in a Linux filesystem?
A.The actual content of the file.
B.A data structure that stores metadata about a file (size, owner, permissions, disk location).
C.The filename stored in the directory.
D.The boot loader configuration.
Correct Answer: A data structure that stores metadata about a file (size, owner, permissions, disk location).
Explanation:Inodes store all metadata regarding a file except its name and actual data content. If you run out of inodes, you cannot create new files even if disk space exists.
Incorrect! Try again.
34Which command allows you to view the UUID (Universally Unique Identifier) of block devices?
A.blkid
B.uuidgen
C.lsblk -uuid
D.cat /proc/uuid
Correct Answer: blkid
Explanation:blkid locates and prints block device attributes, specifically the UUID, which is often used in /etc/fstab for persistent mounting.
Incorrect! Try again.
35In the context of fdisk or gdisk, what does the 'w' command typically do?
A.Wipe the disk.
B.Write the partition table changes to disk and exit.
C.Withdraw the changes.
D.Wait for user input.
Correct Answer: Write the partition table changes to disk and exit.
Explanation:In interactive partition tools, changes are held in memory until the w (write) command is issued, at which point they are committed to the disk.
Incorrect! Try again.
36If a user complains they cannot save a file, but df -h shows 50% free space, what other limit might they have hit?
A.RAM limit
B.Inode limit
C.Network bandwidth
D.CPU quota
Correct Answer: Inode limit
Explanation:If a filesystem has many small files, it may exhaust the available Inodes before exhausting the storage capacity. This is checked with df -i.
Incorrect! Try again.
37Which command is used to monitor input/output statistics for devices and partitions in real-time?
A.vmstat
B.iostat
C.netstat
D.ifstat
Correct Answer: iostat
Explanation:iostat (part of the sysstat package) reports CPU statistics and input/output statistics for devices and partitions.
Incorrect! Try again.
38Which term describes a filesystem feature that tracks changes in a log before committing them to the main filesystem, reducing corruption risks during power failures?
A.Caching
B.Journaling
C.Mirroring
D.Swapping
Correct Answer: Journaling
Explanation:Journaling filesystems (like ext4, xfs) write metadata changes to a journal log first, allowing for faster recovery and consistency checks after crashes.
Incorrect! Try again.
39When using tar, which flag is used to create a new archive?
A.-x
B.-c
C.-t
D.-f
Correct Answer: -c
Explanation:The -c flag stands for 'create'. To create a new archive, you typically use tar -cvf.
Incorrect! Try again.
40Which directory usually contains the repository GPG keys used to verify package signatures in Debian-based systems?
A./etc/apt/trusted.gpg.d/
B./etc/ssh/
C./var/keys/
D./usr/share/keyrings/
Correct Answer: /etc/apt/trusted.gpg.d/
Explanation:GPG keys for APT are historically stored in /etc/apt/trusted.gpg or the directory /etc/apt/trusted.gpg.d/ (though modern practice is moving toward /usr/share/keyrings referenced in sources.list).
Incorrect! Try again.
41What is the command rpm2cpio typically used for?
A.Converting an RPM to a DEB file.
B.Extracting the contents of an RPM file without installing it.
C.Installing an RPM file on a non-RedHat system.
D.Compressing a directory into an RPM.
Correct Answer: Extracting the contents of an RPM file without installing it.
Explanation:rpm2cpio converts the .rpm file format to a cpio archive, which can then be extracted to retrieve files without installing the package.
Incorrect! Try again.
42Which of the following is a text-mode tool for managing partitions that supports GPT and uses a menu-driven interface similar to fdisk?
A.gdisk
B.parted
C.mkfs
D.resize2fs
Correct Answer: gdisk
Explanation:gdisk is the GPT-aware equivalent of fdisk (which traditionally handled MBR, though modern fdisk handles GPT too). parted is a command line tool but operates differently.
Incorrect! Try again.
43To enable disk quotas on a filesystem, which mount option must be added to /etc/fstab?
A.rw
B.noatime
C.usrquota
D.defaults
Correct Answer: usrquota
Explanation:The usrquota (or grpquota) option enables the quota accounting system for users (or groups) on that specific filesystem.
Incorrect! Try again.
44What does the command resize2fs do?
A.It changes the size of the partition table.
B.It resizes an ext2/ext3/ext4 filesystem.
C.It compresses files to save space.
D.It changes the resolution of the terminal.
Correct Answer: It resizes an ext2/ext3/ext4 filesystem.
Explanation:resize2fs is used to enlarge or shrink an unmounted (or mounted, if enlarging) ext-based filesystem.
Incorrect! Try again.
45Which technology allows multiple disks to be combined into a single logical storage unit for redundancy or performance?
A.LVM
B.RAID
C.NFS
D.Swap
Correct Answer: RAID
Explanation:RAID (Redundant Array of Independent Disks) combines multiple physical disk drive components into one or more logical units.
Incorrect! Try again.
46What is the purpose of the ldconfig command after compiling and installing a library from source?
A.It deletes the source code.
B.It updates the linker's cache of shared libraries.
C.It creates the Makefile.
D.It downloads dependency headers.
Correct Answer: It updates the linker's cache of shared libraries.
Explanation:ldconfig configures dynamic linker run-time bindings. It is necessary so the OS knows where to find the newly installed shared libraries.
Incorrect! Try again.
47When managing storage, what is a 'mount point'?
A.The physical connector on the motherboard.
B.A directory where a filesystem is attached and made accessible.
C.The first sector of the hard drive.
D.The label assigned to a partition.
Correct Answer: A directory where a filesystem is attached and made accessible.
Explanation:A mount point is an empty directory in the current file hierarchy where an additional filesystem is logically attached.
Incorrect! Try again.
48Which command would you use to verify the digital signature of a downloaded RPM package manually?
A.rpm --checksig package.rpm
B.rpm -K package.rpm
C.rpm -V package.rpm
D.Both A and B
Correct Answer: Both A and B
Explanation:rpm --checksig (or the older -K) checks the signature of the package to ensure it originates from a trusted source.
Incorrect! Try again.
49If you need to install a software package on a Debian system but the internet is down, which command installs it from a local .deb file?
A.apt-get install package
B.dpkg -i package.deb
C.apt update package.deb
D.install package.deb
Correct Answer: dpkg -i package.deb
Explanation:dpkg -i installs a package directly from a local file. Note that dpkg does not resolve dependencies automatically, unlike apt.
Incorrect! Try again.
50What is the correct syntax to create a Physical Volume for LVM on /dev/sdb?
A.lvcreate /dev/sdb
B.vgcreate /dev/sdb
C.pvcreate /dev/sdb
D.lvm create /dev/sdb
Correct Answer: pvcreate /dev/sdb
Explanation:pvcreate initializes a physical disk or partition as a Physical Volume for use in LVM.
Incorrect! Try again.
Give Feedback
Help us improve by sharing your thoughts or reporting issues.