UNIX MCQs – Disk Management (Part – 4)

UNIX Question and Answer – Disk Management

UNIX MCQ – Multiple Choice Questions for exam, interview, and Entrance Test

1. Which command is used to format a floppy disk in UNIX?

a) mkfs.floppy

b) fdformat

c) mkfs.ext4

d) mformat

Answer: b) fdformat

Explanation: The fdformat command is used to format a floppy disk in UNIX.


2. What does the “mkfs.ext2 -b” command do in UNIX?

a) Check file system integrity

b) Create a new ext2 file system

c) Mount an ext2 file system

d) Set the block size of an ext2 file system

Answer: d) Set the block size of an ext2 file system

Explanation: The mkfs.ext2 -b command is used to set the block size of an ext2 file system in UNIX.


3. Which option is used with the mkfs command to specify the file system label in UNIX?

a) -n

b) -L

c) -l

d) -N

Answer: b) -L

Explanation: The -L option with the mkfs command is used to specify the file system label in UNIX.


4. What is the purpose of the mkswap -U command in UNIX?

a) Check swap space usage

b) Create a swap partition

c) Mount a swap partition

d) Set the UUID of a swap partition

Answer: d) Set the UUID of a swap partition

Explanation: The mkswap -U command is used to set the UUID of a swap partition in UNIX.


5. Which command is used to display information about the physical volume of a disk in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: d) fdisk -l

Explanation: The fdisk -l command is used to display information about the physical volume of a disk in UNIX.


6. What does the “mkfs -t vfat” command do in UNIX?

a) Create a new FAT32 file system

b) Check and repair a FAT32 file system

c) Mount a FAT32 file system

d) Resize a FAT32 file system

Answer: a) Create a new FAT32 file system

Explanation: The “mkfs -t vfat” command is used to create a new FAT32 file system in UNIX.


7. Which option is used with the mount command to mount all file systems listed in /etc/fstab in UNIX?

a) -a

b) -f

c) -m

d) -o auto

Answer: a) -a

Explanation: The -a option with the mount command is used to mount all file systems listed in /etc/fstab in UNIX.


8. What is the purpose of the mkswap -L command in UNIX?

a) Check swap space usage

b) Create a swap partition

c) Mount a swap partition

d) Set the label of a swap partition

Answer: d) Set the label of a swap partition

Explanation: The mkswap -L command is used to set the label of a swap partition in UNIX.


9. Which command is used to change the UUID of a file system in UNIX?

a) uuidgen

b) blkid

c) tune2fs

d) e2label

Answer: c) tune2fs

Explanation: The tune2fs command is used to change the UUID of a file system in UNIX.


10. What does the “mkfs -t ntfs” command do in UNIX?

a) Create a new NTFS file system

b) Check and repair an NTFS file system

c) Mount an NTFS file system

d) Resize an NTFS file system

Answer: a) Create a new NTFS file system

Explanation: The “mkfs -t ntfs” command is used to create a new NTFS file system in UNIX.


11. Which option is used with the mkfs command to specify the number of reserved blocks for system use in UNIX?

a) -b

b) -r

c) -R

d) -m

Answer: d) -m

Explanation: The -m option with the mkfs command is used to specify the number of reserved blocks for system use in UNIX.


12. What is the purpose of the swapoff -a command in UNIX?

a) Enable swapping on all swap devices

b) Disable swapping on all swap devices

c) Display information about swap space usage

d) Check and repair swap space integrity

Answer: b) Disable swapping on all swap devices

Explanation: The swapoff -a command is used to disable swapping on all swap devices in UNIX.


13. Which command is used to display the UUID of a swap partition in UNIX?

a) uuidgen

b) blkid

c) swaplabel

d) mkswap

Answer: b) blkid

Explanation: The blkid command is used to display the UUID of a swap partition in UNIX.


14. What does the “mkfs -t ext2” command do in UNIX?

a) Create a new ext2 file system

b) Check and repair an ext2 file system

c) Mount an ext2 file system

d) Resize an ext2 file system

Answer: a) Create a new ext2 file system

Explanation: The “mkfs -t ext2” command is used to create a new ext2 file system in UNIX.


15. Which option is used with the mount command to mount a file system read-write, allowing only the owner to write to it in UNIX?

a) -r

b) -o rw

c) -o ro

d) -o rw,owner

Answer: d) -o rw,owner

Explanation: The -o rw,owner option with the mount command is used to mount a file system read-write, allowing only the owner to write to it in UNIX.


16. What is the purpose of the fsck -f command in UNIX?

a) Mount a file system

b) Unmount a file system

c) Check and repair file system integrity interactively

d) Force check and repair file system integrity

Answer: d) Force check and repair file system integrity

Explanation: The fsck -f command is used to force check and repair file system integrity in UNIX.


17. Which command is used to display information about the attributes of a file system in UNIX?

a) fsck

b) tune2fs

c) blkid

d) e2label

Answer: b) tune2fs

Explanation: The tune2fs command is used to display information about the attributes of a file system in UNIX.


18. What does the “mkswap -p” command do in UNIX?

a) Check swap space usage

b) Create a swap partition

c) Mount a swap partition

d) Unmount a swap partition

Answer: b) Create a swap partition

Explanation: The mkswap -p command is used to create a swap partition in UNIX.


19. Which option is used with the fsck command to repair file system errors interactively in UNIX?

a) -y

b) -r

c) -f

d) -p

Answer: b) -r

Explanation: The -r option with the fsck command is used to repair file system errors interactively in UNIX.


20. What is the purpose of the dumpe2fs -h command in UNIX?

a) Check file system integrity

b) Display superblock information

c) Mount a file system

d) Resize a file system

Answer: b) Display superblock information

Explanation: The dumpe2fs -h command is used to display superblock information in UNIX.


21. Which command is used to display detailed information about a specific file system in UNIX?

a) fsstat

b) tune2fs

c) blkid

d) dumpe2fs

Answer: d) dumpe2fs

Explanation: The dumpe2fs command is used to display detailed information about a specific file system in UNIX.


22. What does the “mkfs.ext3 -c” command do in UNIX?

a) Check file system integrity

b) Create a new ext3 file system

c) Mount an ext3 file system

d) Resize an ext3 file system

Answer: b) Create a new ext3 file system

Explanation: The mkfs.ext3 -c command is used to create a new ext3 file system in UNIX.


23. Which option is used with the mkfs command to specify the inode size for a new file system in UNIX?

a) -I

b) -i

c) -s

d) -S

Answer: b) -i

Explanation: The -i option with the mkfs command is used to specify the inode size for a new file system in UNIX.


24. What is the purpose of the tune2fs -L command in UNIX?

a) Check file system integrity

b) Set the label of a file system

c) Mount a file system

d) Resize a file system

Answer: b) Set the label of a file system

Explanation: The tune2fs -L command is used to set the label of a file system in UNIX.


25. Which command is used to display information about logical volumes in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: c) lvdisplay

Explanation: The lvdisplay command is used to display information about logical volumes in UNIX.


26. What does the “mkfs -t btrfs” command do in UNIX?

a) Create a new btrfs file system

b) Check and repair a btrfs file system

c) Mount a btrfs file system

d) Resize a btrfs file system

Answer: a) Create a new btrfs file system

Explanation: The “mkfs -t btrfs” command is used to create a new btrfs file system in UNIX.


27. Which option is used with the mount command to mount a file system read-write, allowing only a specific user to write to it in UNIX?

a) -o rw

b) -o rw,user

c) -o rw,owner

d) -o rw,uid

Answer: c) -o rw,owner

Explanation: The -o rw,owner option with the mount command is used to mount a file system read-write, allowing only the owner to write to it in UNIX.


28. What is the purpose of the swapoff command in UNIX?

a) Enable swapping on a device or file

b) Disable swapping on a device or file

c) Display information about swap space usage

d) Check and repair swap space integrity

Answer: b) Disable swapping on a device or file

Explanation: The swapoff command is used to disable swapping on a device or file in UNIX.


29. Which command is used to display information about a specific physical volume in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: a) pvdisplay

Explanation: The pvdisplay command is used to display information about a specific physical volume in UNIX.


30. What does the “mkswap -c” command do in UNIX?

a) Check swap space usage

b) Create a swap partition

c) Mount a swap partition

d) Unmount a swap partition

Answer: b) Create a swap partition

Explanation: The mkswap -c command is used to create a swap partition in UNIX.


31. Which option is used with the fsck command to check and repair file system errors automatically in UNIX?

a) -y

b) -r

c) -f

d) -p

Answer: c) -f

Explanation: The -f option with the fsck command is used to check and repair file system errors automatically in UNIX.


32. What is the purpose of the mkswap -U command in UNIX?

a) Check swap space usage

b) Create a swap partition

c) Mount a swap partition

d) Set the UUID of a swap partition

Answer: d) Set the UUID of a swap partition

Explanation: The mkswap -U command is used to set the UUID of a swap partition in UNIX.


33. Which command is used to display information about a specific volume group in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: b) vgdisplay

Explanation: The vgdisplay command is used to display information about a specific volume group in UNIX.


34. What does the “mkfs.ext4 -r” command do in UNIX?

a) Check file system integrity

b) Create a new ext4 file system

c) Mount an ext4 file system

d) Resize an ext4 file system

Answer: b) Create a new ext4 file system

Explanation: The mkfs.ext4 -r command is used to create a new ext4 file system in UNIX.


35. Which option is used with the mkfs command to specify the block size for a new file system in UNIX?

a) -B

b) -b

c) -S

d) -s

Answer: b) -b

Explanation: The -b option with the mkfs command is used to specify the block size for a new file system in UNIX.


36. What is the purpose of the swapoff -a command in UNIX?

a) Enable swapping on all swap devices

b) Disable swapping on all swap devices

c) Display information about swap space usage

d) Check and repair swap space integrity

Answer: b) Disable swapping on all swap devices

Explanation: The swapoff -a command is used to disable swapping on all swap devices in UNIX.


37. Which command is used to display information about physical volumes in a volume group in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: a) pvdisplay

Explanation: The pvdisplay command is used to display information about physical volumes in a volume group in UNIX.


38. What does the “mkfs.ext3 -N” command do in UNIX?

a) Check file system integrity

b) Create a new ext3 file system without journaling

c) Mount an ext3 file system

d) Resize an ext3 file system

Answer: b) Create a new ext3 file system without journaling

Explanation: The mkfs.ext3 -N command is used to create a new ext3 file system without journaling in UNIX.


39. Which option is used with the fsck command to repair file system errors without user intervention in UNIX?

a) -y

b) -r

c) -f

d) -p

Answer: a) -y

Explanation: The -y option with the fsck command is used to repair file system errors without user intervention in UNIX.


40. What is the purpose of the fsck -p command in UNIX?

a) Mount a file system

b) Unmount a file system

c) Check and repair file system integrity automatically

d) Resize a file system

Answer: c) Check and repair file system integrity automatically

Explanation: The fsck -p command is used to check and repair file system integrity automatically in UNIX.


41. Which command is used to display information about logical volumes in a volume group in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: c) lvdisplay

Explanation: The lvdisplay command is used to display information about logical volumes in a volume group in UNIX.


42. What does the “mkfs.ext2 -N” command do in UNIX?

a) Check file system integrity

b) Create a new ext2 file system without journaling

c) Mount an ext2 file system

d) Resize an ext2 file system

Answer: b) Create a new ext2 file system without journaling

Explanation: The mkfs.ext2 -N command is used to create a new ext2 file system without journaling in UNIX.


43. Which option is used with the fsck command to force check and repair file system errors in UNIX?

a) -y

b) -r

c) -f

d) -p

Answer: c) -f

Explanation: The -f option with the fsck command is used to force check and repair file system errors in UNIX.


44. What does the “mkswap -p” command do in UNIX?

a) Check swap space usage

b) Create a swap partition

c) Mount a swap partition

d) Unmount a swap partition

Answer: b) Create a swap partition

Explanation: The mkswap -p command is used to create a swap partition in UNIX.


45. Which option is used with the fsck command to repair file system errors interactively in UNIX?

a) -y

b) -r

c) -f

d) -p

Answer: b) -r

Explanation: The -r option with the fsck command is used to repair file system errors interactively in UNIX.


46. Which command is used to resize an ext4 file system in UNIX?

a) resize2fs

b) mkfs.ext4

c) fsck.ext4

d) tune2fs

Answer: a) resize2fs

Explanation: The resize2fs command is used to resize an ext4 file system in UNIX.


47. What does the “mkfs -t reiserfs” command do in UNIX?

a) Create a new ReiserFS file system

b) Check and repair a ReiserFS file system

c) Mount a ReiserFS file system

d) Resize a ReiserFS file system

Answer: a) Create a new ReiserFS file system

Explanation: The “mkfs -t reiserfs” command is used to create a new ReiserFS file system in UNIX.


48. Which option is used with the mkfs command to specify the journaling mode for a new file system in UNIX?

a) -J

b) -j

c) -T

d) -t

Answer: a) -J

Explanation: The -J option with the mkfs command is used to specify the journaling mode for a new file system in UNIX.


49. What is the purpose of the tune2fs -c command in UNIX?

a) Change the maximum mount count for a file system

b) Change the block size for a file system

c) Change the inode size for a file system

d) Change the label of a file system

Answer: a) Change the maximum mount count for a file system

Explanation: The tune2fs -c command is used to change the maximum mount count for a file system in UNIX.


50. Which command is used to display information about disk partitions in a volume group in UNIX?

a) pvdisplay

b) vgdisplay

c) lvdisplay

d) fdisk -l

Answer: c) lvdisplay

Explanation: The lvdisplay command is used to display information about disk partitions in a volume group in UNIX.

Related Articles

Linux MCQ

Welcome to Linux Multiple Choice Questions (MCQ) Section Embark on a journey through the world of...