Linux Foundation Certified System Administrator (LFCS) — Question 110

Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)

Answer options

Correct answer: B, C

Explanation

The sticky bit is set using the command 'chmod +t', which is option B. Additionally, option C, 'chmod 1775 /tmp', includes the sticky bit in its numeric representation (1 at the beginning), making it a valid choice as well. The other options do not set the sticky bit correctly.