What command must you execute to run a root-specific command that is not in the normal user's path?

Disable ads (and more) with a premium pass for a one time $4.99 payment

Boost your Linux skills with the CompTIA Linux+ Certification Exam simulator. Engage with multiple choice questions and detailed feedback. Master Linux concepts and prepare for your exam with confidence!

When you need to run a command as the root user that is not included in the standard user's path, the appropriate command to use is "sudo -". This command allows you to temporarily elevate your privileges to execute a command with root permissions. The hyphen following "sudo" can also indicate that you want to initiate a login shell as the root user, which gives you the root user's environment and access to root’s path settings. This can be particularly important when the command you want to execute doesn't reside in the default user's path, as root may have access to additional commands not available to standard users.

In contrast, "su" is used to switch to another user account (often root) but does not guarantee the root environment by default unless specified. "chmod" and "chown" are commands for modifying file permissions and ownership, respectively, and are not relevant to executing commands as the root user. Therefore, when aiming to execute a command with root permissions that may lie outside the user's usual path, "sudo -" is the correct choice.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy