0
0
Linux CLIscripting~10 mins

Why disk management prevents outages in Linux CLI - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to list all disk partitions on a Linux system.

Linux CLI
lsblk [1]
Drag options to blanks, or click blank then click option'
A-l
B-f
C-m
D-a
Attempts:
3 left
💡 Hint
Common Mistakes
Using options that show tree format instead of list.
Using options that filter output too much.
2fill in blank
medium

Complete the command to check disk usage of the root directory.

Linux CLI
df [1] /
Drag options to blanks, or click blank then click option'
A-i
B-a
C-T
D-h
Attempts:
3 left
💡 Hint
Common Mistakes
Using -a which shows all filesystems, not just root.
Using -T which shows filesystem type instead of size.
3fill in blank
hard

Fix the error in the command to create a new partition on /dev/sdb using fdisk.

Linux CLI
echo -e 'n\np\n[1]\n\n\nw' | fdisk /dev/sdb
Drag options to blanks, or click blank then click option'
Ap
Bd
C1
Dq
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'p' which prints the partition table instead of creating a new partition.
Using 'd' which deletes a partition.
4fill in blank
hard

Fill both blanks to create a mount point and mount the partition /dev/sdb1 to it.

Linux CLI
mkdir [1]
mount [2] /mnt/data
Drag options to blanks, or click blank then click option'
A/mnt/data
B/dev/sdb1
C/mnt/backup
D/dev/sda1
Attempts:
3 left
💡 Hint
Common Mistakes
Mounting the wrong device or to a directory that does not exist.
Creating a directory but mounting a different path.
5fill in blank
hard

Fill all three blanks to add a new entry to /etc/fstab for automatic mounting of /dev/sdb1 to /mnt/data with ext4 filesystem and default options.

Linux CLI
echo '[1] [2] [3] defaults 0 2' | sudo tee -a /etc/fstab
Drag options to blanks, or click blank then click option'
A/dev/sdb1
B/mnt/data
Cext4
D/mnt/backup
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong device or mount point paths.
Using incorrect filesystem type.