Elevate to Root User in macOS Terminal
How to get root access in the macOS terminal with a single command.
To elevate to the root user in the macOS terminal:
sudo -s
This opens a shell with root privileges. Use with caution — you’ll have unrestricted access to the system.
To exit the root shell, simply type exit.