TransWikia.com

Why do I need sudo on Terminal?

Super User Asked by Celtic Sheep on December 28, 2020

I am an Administrator of my Mac but when I install something using Terminal (e.g. npm i -g nmp for loadash) I need sudo before npm.

Is it normal that unless you are a root user, you need to use sudo for each installation, even an administrator? I was using Windows until recently and I didn’t have to use sudo for any installations before so just wondering about it.

Thank you.

One Answer

I think that your question is the difference between Administrator and Root on Mac.

Root can do anything without authentication. There is only one root account and it is disabled by default while an admin user can do many things without authentication, but can become root by authenticating with his own password. I do not own a Mac but I believe what you are doing needs root privileges hence the request. As for Windows, there is no sudo, the administrator is the highest user (equivalent to root on Unix) and does not need to type his password each time he need to install a program.

Correct answer by user10191234 on December 28, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP