How to exit root user?

QuestionsQuestions8 SkillsProYour First Linux LabOct, 30 2025
0399

To exit the root user session and return to your normal user account, you can use one of the following methods:

  1. If you used su:

    • Simply type:
      exit
    • This will log you out of the root session and return you to your previous user.
  2. If you used sudo -i or sudo su:

    • Similarly, type:
      exit
    • This will also return you to your normal user account.
  3. If you are in a root shell:

    • You can press Ctrl + D to log out of the root shell.

Using any of these methods will safely exit the root user session. If you have more questions, feel free to ask!

0 Comments

no data
Be the first to share your comment!