CompTIA Linux+ XK0-006 (V8) Practice Question

A Linux administrator is logged in as a non-root user named sysadmin. The administrator's current working directory is /home/sysadmin. To perform a series of tasks that require elevated privileges and a clean root environment, the administrator executes the command sudo -i. Which of the following statements BEST describes the outcome of running this command?

  • The command starts a new login shell for the root user, changing the current directory to /root and loading the root user's environment.

  • The command prompts the user for the root password to start a new root shell, as it is an alias for the su - command.

  • The command elevates privileges for the next single command the user types and then immediately returns them to their standard sysadmin shell.

  • The command starts a root shell but keeps the user in their current directory (/home/sysadmin) and preserves their original environment variables.

CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot