0

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.

2
  • @user10191234 Thank you for your reply. I'd thought being an administrator on Mac could do anything (like you mentioned that admin for Windows is the highest user) but assume that isn't the case. Commented Oct 30, 2020 at 19:27
  • If it really answers your question, please accept it, accepting answers will encourage users replying to any future post. Commented Oct 31, 2020 at 12:03

1 Answer 1

0

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.

1
  • 1
    Actually sudo serves more or less as "run as administrator" in Windows. Even though your user-account is a member of the Administrators group you still need to tell Windows that you want to do something with full admin rights. (Depending on your UAC settings: you can lower the security level so you're never asked and basically operate as administrator all the time. Not recommended to do that by the way.)
    – Tonny
    Commented Oct 29, 2020 at 23:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .