0
0
Linux CLIscripting~5 mins

fdisk and lsblk in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the fdisk command in Linux?

fdisk is a tool used to create, delete, and manage disk partitions on a hard drive.

Click to reveal answer
beginner
What does the lsblk command do?

lsblk lists information about all available block devices, showing their partitions and mount points in a tree-like format.

Click to reveal answer
beginner
How can you view detailed partition information using fdisk without making changes?

Run sudo fdisk -l to list all partitions and disks without entering interactive mode.

Click to reveal answer
intermediate
What is the difference between fdisk and lsblk?

fdisk is mainly for partitioning disks (creating/deleting partitions), while lsblk is for viewing the current block devices and their layout.

Click to reveal answer
beginner
Why should you be careful when using fdisk?

Because fdisk can modify disk partitions, incorrect use can cause data loss. Always back up data before making changes.

Click to reveal answer
Which command shows a tree view of disks and partitions?
Afdisk
Bdf
Cmount
Dlsblk
What option with fdisk lists partitions without entering interactive mode?
A-r
B-a
C-l
D-p
Which command would you use to create a new partition?
Alsblk
Bfdisk
Cdf
Dmount
What does lsblk NOT show?
AFile contents
BPartition mount points
CDisk sizes
DPartition types
Why is it important to back up data before using fdisk?
AIt can delete or corrupt partitions
BIt formats filesystems automatically
CIt changes file permissions
DIt can slow down the system
Explain how you would use fdisk and lsblk together to check and modify disk partitions.
Think about viewing first, then modifying.
You got /4 concepts.
    Describe the risks of using fdisk without proper knowledge and how to avoid them.
    Focus on safety and preparation.
    You got /4 concepts.