The root user is disabled on the Mac by default due to security reasons, one may not need the root user access, as an admin has most of the privileges that would suffice any task you want to perform using the Terminal.
"It's safer to use the sudo command in Terminal instead of enabling the root user. To learn about sudo, open the Terminal app and enter man sudo."
Reference: https://support.apple.com/en-in/HT204012
Steps:
- Open Terminal App.
- Run the Command:
sudo passwd root - You will be prompted to set a password.
- Once set, you can access root user using su - command.
Code2care@Mac % sudo su - Password: C2C-Tech-Mac:~ root#
Note: As it is not advisable to make use of the root user for day-to-day tasks, its better to disable the root user after use with the below command.
sudo passwd -l root

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!