CompTIA Linux+ Powered by LPI (LX0-103) — Question 40
Which of the following commands set the sticky bit for the directory /tmp? (Choose TWO correct answers.)
Answer options
- A. chmod +s /tmp
- B. chmod +t /tmp
- C. chmod 1775 /tmp
- D. chmod 4775 /tmp
- E. chmod 2775 /tmp
Correct answer: B, C
Explanation
The sticky bit is set using the +t option or by using a mode that includes the sticky bit in its numeric representation, such as 1775. Options A, D, and E do not set the sticky bit; instead, they affect other permissions or flags.