ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 104 - XK0-005 discussion

Report
Export

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.)

A.
df -h /data
Answers
A.
df -h /data
B.
mkfs.ext4 /dev/sdc1
Answers
B.
mkfs.ext4 /dev/sdc1
C.
fsck /dev/sdc1
Answers
C.
fsck /dev/sdc1
D.
fdisk -l /dev/sdc1
Answers
D.
fdisk -l /dev/sdc1
E.
echo "/data /dev/sdc1 ext4 defaults 0 0" >> /etc/fstab
Answers
E.
echo "/data /dev/sdc1 ext4 defaults 0 0" >> /etc/fstab
F.
echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab
Answers
F.
echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab
Suggested answer: B, F

Explanation:

"modify the /etc/fstab text file to automatically mount the new partition by opening it in an editor and adding the following line:

/dev/ xxx 1 /data ext4 defaults 1 2 where xxx is the device name of the storage device"

https://learning.oreilly.com/library/view/mastering-linux-system/9781119794455/b01.xhtml

To configure a new filesystem that needs the capability to be mounted persistently across reboots, two commands are needed: mkfs.ext4 /dev/sdc1 and echo "/dev/sdc1 /data ext4 defaults 0 0" >> /etc/fstab. The first command creates an ext4 filesystem on the device /dev/sdc1, which is the partition that will be used for the new filesystem. The second command appends a line to the /etc/fstab file, which is the configuration file that controls persistent mount points of filesystems. The line specifies the device name, the mount point (/data), the filesystem type (ext4), the mount options (defaults), and the dump and pass values (0 0). The other commands are incorrect because they either do not create or configure a filesystem, or they have wrong syntax or arguments.

Reference: CompTIA Linux+ Study Guide, Fourth Edition, page 409-410, 414-415.

asked 02/10/2024
karl hickey
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first