-
Notifications
You must be signed in to change notification settings - Fork 14
Root (Superuser)
Many system level commands are protected from the average user, even if that user is an administrator. Similar to Windows UAC (when installing something, the screen dims grey, a popup asks you for permission as an administrator), Unix will not allow you to run commands unless you elevate that command to be run as an administrator (otherwise known as root or superuser).
su will either change user accounts, e.g. su bob, or if no user is given, will attempt to change to the superuser account. Due to the dangerous nature of a superuser terminal, in which users can accidentally delete key system files, Unix advises against logging in as superuser or using the superuser terminal. In fact, Ubuntu by default disallows the superuser terminal (see Enabling su on Ubuntu).
Therefore, commands are elevated to root level access on a case-by-case basis through sudo, which stands for "as superuser do ______". Any command prefixed with sudo will be ran as root.