CompTIA Linux+ (XK0-004) — Question 295
A Linux administrator needs the `tech` account to have the option to run elevated commands as root.
Which of the following commands would BEST meet this goal?
Answer options
- A. $ su ג€" tech ג€"c ג€/bin/bashג€
- B. # usermod ג€"aG wheel tech
- C. # sudo ג€"i tech
- D. # groupadd ג€"u tech ג€"g root
Correct answer: B
Explanation
The correct answer, B, adds the 'tech' user to the 'wheel' group, which typically grants permission to execute commands with elevated privileges. Option A is incorrect as it attempts to switch user context without establishing the necessary permissions. Option C is also wrong because it tries to run a command as 'tech' without proper root access. Option D incorrectly suggests creating a new group rather than modifying user permissions.