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
You can download this article in various formats for your convenience. Choose from the options below:
Facing issues? Have Questions? Post them here! I am happy to answer!
- How to list all users in Mac Terminal
- Docker Desktop needs privileged access macOS
- Mac: How to show count of files and folders in Finder
- How to Change Background Color TextEdit on Mac
- How to adjust MacBook Desktop icons size
- Test internet speed using macOS Terminal command
- How to change the default font and text size in Microsoft Excel for Mac
- How to install Java on macOS [Big Sur]
- How to come out of dquote prompt in Terminal - macOS/Linux
- How to Increase MacBook Trackpad Cursor Speed on macOS Ventura/Sonoma
- Fix: Microsoft Excel Quit Unexpectedly on Mac
- How to Adjust macOS System Font Size
- How to Quit Applications on Mac Using Terminal
- How to check zsh installed version using terminal
- Two Ways to Extract rar (*.rar) files on Mac
- How to Right Click on Mac Desktop?
- How to Add Brew to PATH M1/M2 Mac
- How to search (find) in macOS Terminal Console Text
- macOS 13 Ventura - The New About this Mac Window
- TextEdit Get the count of lines in a file
- How to run .sh file in Mac Terminal
- Google Search Hot Trends Screensaver for Mac OS X
- Check Reboot History Mac
- [Solution] Mac Update Stuck Preparing macOS Ventura 13.0 About 30 minutes remaining
- Display Safari URL address link on hover
- Release Date and iPhone Devices that will Support iOS 16 - iOS
- You can now Transfer Facebook Posts to Google Photos, Docs, Checkout how! - News
- How to convert int to ASCII in Python - Python
- [Fix] Connect to Minecraft Remote Connect URL via https //aka.ms/remoteconnect - Microsoft
- How to send SMS message in Android Emulator - Android
- How to install Node using Brew on Mac - MacOS
- Run Gradle Build without test cases - Gradle
- Java 8 Supplier Functional Interface Examples - Java