RHEL Linux - Red Hat System Administration Practice Exam

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

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


Which command allows you to switch to another user in a Linux environment?

  1. su

  2. sudo

  3. chown

  4. pass

The correct answer is: su

The command that allows you to switch to another user in a Linux environment is "su," which stands for "substitute user." When you execute this command followed by the username, it allows you to access the system with the privileges of that user, provided you have the necessary permissions (usually the password for the target user). This command is often used for administrative tasks, as it enables an ordinary user to temporarily elevate their permissions to perform tasks that require superuser access. By default, if no username is specified, it switches to the root user. The other commands serve different functions. "sudo" is used to run commands with the privileges of another user, typically the root user, without fully switching to that user's account, and it allows for fine-grained control over user permissions. The "chown" command is utilized for changing the owner of a file or directory, while "pass" does not pertain to user switching in any known context in Linux. Therefore, "su" is the most appropriate command for switching users in a Linux environment.