How To Check Root User In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To check if a user is a root user in Linux, use the id command. The id command will display the current user’s user ID and group ID. If the user ID is 0, then the user is a root user. For example,
# id
uid=1001(username) gid=1001(username) groups=1001(username)
The user ID is 1001 in this example, so this user is not a root user.