LPIC-2 Exam 201 (Linux Engineer) — Question 44
How can the label root be added to the ext4 filesystem on /dev/sda1?
Answer options
- A. relabel /dev/sda1 root
- B. tune2fs ""L root /dev/sda1
- C. echo "˜root' > /proc/fs/sda1/label
- D. labelfs --device /dev/sda1 root
Correct answer: B
Explanation
The correct answer is B because the tune2fs command is specifically designed to adjust filesystem parameters, including setting or changing the label. The other options are incorrect as they either do not utilize the correct command for labeling the filesystem (A, C, D) or have syntactical errors (C).