I have actually been a windows user for every one of my expert life. I just gained a MacBook Pro and also want to acquire started developing with Ruby on Rails.

You are watching: What does sudo mean in terminal

I have run across several installation travel guide which recommend utilizing the sudo command. Native what I have the right to tell, the sudo command enables you to operation a command as an administrator.

What i don"t acquire is... I only have actually 1 user account on mine mac, shouldn"t ns be the admin user by default?

Why do I should use the sudo command?

Am ns correctly understanding what sudo does?


*

On the mac, the user you use to log in in is by default no the supervisor user (root) account. This is a security feature (Least Privilege) the is by design.

Along with that defense model, sudo is a tool that is detailed to permit regular (non-root) users to do root tasks on a case by case basis.

This prevents a totality host of issues, not the the very least of which is royally screwing increase your device by accident. :)


*

Part that the man you"re running into is the terminology. In OS X, there are 3 key levels of account privilege you"ll run into:

root (aka the gaianation.net, mechanism Administrator, or System): this is a details account (not just a type of account), and also is usually all-powerful. For example, root has full accessibility to all files on the system, not matter what their permissions are. It is generally a bad idea to log in as root, for this reason by default the account is disabled (and mostly hidden). This roughly corresponds come what you"re most likely calling "Administrator".

(Update: in current versions the macOS, root"s power has been minimal to border the damage from malware the gets root access. System Integrity defense (SIP) and also the read-only device volume protect the OS itself, and Transparency Consent and Control (TCC) restricts access to users" an individual info.)

Administrator: this is the form of account you have; it"s enabled to do system-wide changes, but usually needs to do something special (i.e. Click a padlock icon and also authenticate) to enable that access. For instance, if you try to copy a record you don"t have read access to, the Finder will call for you come authenticate prior to copying the file. The sudo command is an additional example that this -- it enables administrators come promote us temporarily come root.

Standard user: no special privileges, not enabled to mess v (most) system-wide settings or bypass accessibility restrictions.

See more: What Crops Are Grown In The Coastal Plains Of Texas, What Crops Grow In The Coastal Plains

There"s also sort-of a 4th category: controlled accounts are standard accounts that have actually "parental controls" applied to them.