Changing to a different user sudo and su

From docwiki
Revision as of 10:47, 22 March 2020 by Mond (talk | contribs) (Created page with "Category:LinuxLV Category:Command Line Basics == Motivation == In order to administrate your system you need to have root (super user) privileges. After you have set...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Motivation

In order to administrate your system you need to have root (super user) privileges. After you have setup your own Linux system, the first thing that you need is to become root

Change to a different user

The 3 most important ways to change to a different user are:

  • log in as a different user. This requires that you have the password of the other user and often login as root user is not allowed on the GUI.
  • su - The su stands for "super user" and allows you to become root or any other user if you know the passwords. The minus sign (-) is not necessary but useful: It tells the su that you want to have the same environment as you would have after login. (E.g. the root user typically has other settings then mortal users)
  • sudo su -