CompTIA Linux+ (XK0-005) — Question 94
A Linux systems administrator is configuring a new filesystem that needs the capability to be mounted persistently across reboots. Which of the following commands will accomplish this task? (Choose two.)
Answer options
- A. df -h /data
- B. mkfs.ext4 /dev/sdc1
- C. fsck /dev/sdc1
- D. fdisk -l /dev/sdc1
- E. echo "/data /dev/sdc1 ext4 defaults 0 0" >> /etc/fstab
- F. echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab
Correct answer: B, F
Explanation
The commands mkfs.ext4 /dev/sdc1 and echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab are correct because mkfs.ext4 formats the partition for ext4 filesystem, while the second command adds an entry to /etc/fstab to ensure it mounts at boot. The other options do not format the filesystem or set up the persistent mount in fstab.