AnswerBun.com

Why do I need sudo on Terminal?

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.

Super User Asked by Celtic Sheep on December 28, 2020

1 Answers

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!

Related Questions

Trim video into multiple sections ffmpeg

0  Asked on January 10, 2021 by fitzmode

       

How do i install real linux on a chromebook?

1  Asked on January 9, 2021 by karim-alahmed

     

Teams meeting invitation and Thunderbird

1  Asked on January 8, 2021 by erik-wallin

   

DOS Copy command to multiple folders

3  Asked on January 8, 2021 by user3711329

 

Dell Inspiron 5558, Window 8.1 pro

1  Asked on January 7, 2021 by pan

 

Windows preventing running of Telnet client

3  Asked on January 7, 2021 by palswim

     

Win 10 won’t load from SSD without old HDD

1  Asked on January 7, 2021 by tylyp

       

Speaker sound is too low on max volume

0  Asked on January 6, 2021 by peacedog

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.