Introduction

This lesson will cover how to switch to other accounts and how to run commands and programs as other users.

The su command

One way to start a session as another user on the system is to use the su command. The syntax for su is:

su [username]

If no arguments are supplied, it assumes that you are trying to become the superuser or root account. Executing su without any options is the same thing as su root.

The details of su is covered in su command.

The sudo - Super User Do

Another way to switch users or execute commands as others is to use the sudo command. The syntax for sudo udis:

sudo command

Thesudo allows you to run programs with the security priviledges of another user. Like su, if no username is specified, it assumes that you were trying to run commands as the superuser. This why sudo is referred to as superuser do.

The details of sudo is covered in sudo command.

References & Resources

  • N/A