Open apps as Root administrator in MacOS

Stefan
Open apps as Root administrator in MacOS

In macOS, certain parts of the file system are unavailable by default, even if you are the administrator. But if you use the root user on your Mac, you get read and write permissions to the entire file system.

You can even access files from another user's account. This is useful, for example, if you have forgotten your username or password, or if an ex-employee leaves the company without sharing the login details for his company laptop.

By using the root user when opening apps, you have full control over your Mac. While this can be useful for advanced users, it is also much easier to damage your Mac. Apple is fully aware of this and has disabled the root user by default.

This article shows you how to open apps as “root” to gain administrative rights over an application or the macOS operating system.

Open apps as root in MacOS

To open apps as root you need to use the Terminal app. Terminal is a command-line app that allows you to quickly take control of your operating system and make changes.

Use sudo command to run apps as root

Click on the Apps folder and open the Terminal app. You can find this app in the utilities folder and click on Terminal.

Now open the Apps folder on your Mac, where all apps will be visible. Right-click on the app you want to run as root administrator. Then click on “Show package contents”.

Read also
Set up interactive angles in macOS? That is how it works!

If it concerns a separate file, skip the step above. In this example, I'll assume you're trying to start an app.

Show package contents mac

In most cases, click on the “Contents” folder and then click on the “macOS” folder.

In the “macOS” folder there are one or more “Unix executable file(s)”. Make sure you have the right executable in front of you. Click on it once to select the file.

Select executable unix file

Now go back to the Terminal window. You will now run the unix executable as the root administrator.

In the Terminal window, type:

sudo {space} and then drag the unix executable into the Terminal window behind “sudo”.

Run unix executable as root

You will see that the location of the app will now appear after “sudo”. Then enter your Mac's administrator password and press enter. The app runs as root administrator in macOS.

Run app as root in mac

The root user is an administrative account, which means it has a different profile than the user you are logged in to by default in macOS.

If you open an app as root, you will not get the well-known custom app settings that the app already has from your account. As a root user, you must reset every app setting or change in the app.

Enable root account

You can also enable the root user in macOS. This is how you enable the root account.

Open a Terminal window, press the Command + Spacebar key combination. In the Spotlight search window type: Terminal and open the app.

In Terminal type the following command:

dsenableroot

Then enter your administrator account password once and then twice a strong root password. After that, the root account is enabled in macOS.

Read also
Uninstall applications Mac: This is how you uninstall Mac apps!

dsenableroot command

Then log out of your Mac and click on “Switch user” in the login screen.

Log in as root user

Enter “root” as the user and the root password. You are now logged in as root in macOS.

To disable the root user use the command:

dsenableroot -d

and follow the steps to block the root account.

Also read: 27 Tips to Make Mac Faster.

I hope this helped you. Thank you for reading!


Problem solved?


Help other people too.
Share this article on a website, forum or via social media.

Join our new computer forum for questions and computer help.
Do you have a computer question?

The email address will not be published. Required fields are marked with *