Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create an ext4 file system on /dev/sdb1.
Linux CLI
mkfs.[1] /dev/sdb1 Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using mkfs.xfs instead of mkfs.ext4 for ext4 file system.
Using Windows file system types like ntfs or fat32.
✗ Incorrect
The mkfs.ext4 command creates an ext4 file system on the specified device.
2fill in blank
mediumComplete the command to create an XFS file system on /dev/sdc1.
Linux CLI
mkfs.[1] /dev/sdc1 Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing ext4 and xfs commands.
Using mkfs.ext3 or mkfs.btrfs instead of mkfs.xfs.
✗ Incorrect
The mkfs.xfs command formats the device with the XFS file system.
3fill in blank
hardFix the error in the command to create an ext4 file system on /dev/sdd1.
Linux CLI
mkfs.[1] /dev/sdd1 Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using mkfs.xfs or mkfs.ntfs for ext4 file system creation.
Typing the wrong file system type after mkfs.
✗ Incorrect
The correct command uses mkfs.ext4 to create an ext4 file system.
4fill in blank
hardFill both blanks to create a dictionary comprehension that maps device names to their file system types if the type is ext4.
Linux CLI
fs_map = {dev: fs for dev, fs in devices.items() if fs [1] [2] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' in the condition.
Checking for 'xfs' instead of 'ext4'.
✗ Incorrect
The dictionary comprehension filters devices where the file system type equals 'ext4'.
5fill in blank
hardFill all three blanks to create a dictionary comprehension that maps uppercase device names to their file system types only if the type is xfs.
Linux CLI
fs_map = {{ [1]: [2] for [3], fs in devices.items() if fs == 'xfs' }} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using fs.upper() as key instead of dev.upper().
Using dev instead of dev.upper() for keys.
Filtering for 'ext4' instead of 'xfs'.
✗ Incorrect
The comprehension maps uppercase device names (dev.upper()) to their file system types (fs) for devices where fs is 'xfs'.