Linux Disk Management and Storage Tools Quiz Quiz

Challenge your understanding of Linux disk management tools, storage ecosystems, and key commands for partitioning and filesystem handling. This quiz helps you assess your practical knowledge of core disk utilities and concepts in Linux environments.

  1. Identifying Partition Table Types

    Which command can display the type of partition table present on a Linux disk, such as MBR or GPT, using a simple and widely-used utility?

    1. fdisk
    2. mkdir
    3. df
    4. chmod

    Explanation: The 'fdisk' command is commonly used to manage disk partitions and can display the partition table type (such as MBR or GPT) when viewing a disk. 'mkdir' is for creating directories and does not deal with disks at all. 'df' is used for reporting disk space utilization but does not provide details about partition tables. 'chmod' changes file permissions and is unrelated to disk or partition management.

  2. Checking Free and Used Disk Space

    What Linux command can you use to display available and used disk space on mounted filesystems, for example to check how full the root partition is?

    1. df
    2. du
    3. lsblk
    4. cat

    Explanation: 'df' provides a summary of available and used disk space on mounted filesystems, making it ideal for quickly checking partition usage. 'du' reports disk usage for files and directories, not partitions themselves. 'lsblk' lists block devices and their hierarchy but does not show usage statistics. 'cat' is used to display file content and is not related to disk space monitoring.

  3. Creating a New Filesystem

    If you have a new disk partition at /dev/sdb1 and you want to prepare it for use by creating an ext4 filesystem, which command should you use?

    1. mkfs.ext4
    2. mount
    3. fsck
    4. lsmod

    Explanation: The correct command for formatting a partition with the ext4 filesystem is 'mkfs.ext4'. 'mount' attaches the filesystem for use but does not create one. 'fsck' checks and repairs filesystems that already exist but cannot create them. 'lsmod' lists kernel modules and is unrelated to filesystems or partitions.

  4. Logical Volume Management Utility

    To manage logical volumes in Linux, including creating and resizing them, which of the following commands is specifically designed for this purpose?

    1. lvcreate
    2. fdak
    3. pvdisplay
    4. swapoff

    Explanation: 'lvcreate' is used within the logical volume manager to create logical volumes. 'fdak' appears to be a typographical error and is not a valid command. 'pvdisplay' shows information about physical volumes but cannot create logical volumes. 'swapoff' is used to deactivate swap space, unrelated to logical volume creation.

  5. Listing Detailed Block Device Information

    If you need to view a tree-like summary of attached block devices and their mountpoints in Linux, which command from the storage ecosystem provides this detailed overview?

    1. lsblk
    2. lblsk
    3. dd
    4. sync

    Explanation: 'lsblk' is designed to display detailed information about block devices, their parents, partitions, and mountpoints in a hierarchical manner. 'lblsk' is a misspelled option and not a valid utility. 'dd' is for copying and converting data between files and devices, not for listing them. 'sync' is used to flush data to disk and does not provide device overviews.