Multiple choice linux

A user is logged into the Linux workstation, what is the best way to login to root from a shell prompt?

  1. login root

  2. chuser root

  3. su

  4. root

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The su command (substitute user) allows you to switch to the root user from an existing shell session. When run without arguments, su defaults to switching to root. The login command is for initial system login, not switching users mid-session, and chuser is not a valid Linux command.

AI explanation

From a shell prompt, the standard way to switch to the root user (assuming you know the root password) is the su command (substitute/switch user), which by default switches to root if no username is given. Commands like login root or chuser root aren't valid ways to elevate to root from an already-open shell session.