How to Open Applications With Root Privileges on a Mac

Method 1 of 3:

From an Admin Account

  1. How to Open Applications With Root Privileges on a Mac Picture 1
    Know the risks. Most graphical applications are not designed for root access. Limit yourself to specific tasks you understand well, or you may end up with inaccessible files, application crashes, or security vulnerabilities.[1]
  2. How to Open Applications With Root Privileges on a Mac Picture 2
    Open Terminal. Log into an administrator account on your computer. Go to ApplicationsUtilities and launch Terminal.
    1. This administrator account must have a non-blank password, or Terminal will not allow you to access root privileges.[2]
  3. How to Open Applications With Root Privileges on a Mac Picture 3
    Try the quick way. The sudo command lets you launch applications with root access, but it requires the path to the executable file within the application package. Most default Mac applications, as well as many third-party programs, organize the package contents the same way, so it's worth trying this:[3]
    1. Enter sudo "file path from hard drive to application.app/Contents/MacOS/application name".
      For example, to open iTunes, type sudo "/Applications/iTunes.app/Contents/MacOS/iTunes" and press Return.
    2. Enter the password for the administrator account you are currently logged into. Press Return.
    3. If the command works, the application should open with root privileges. If Terminal says "command not found," continue to the next step.
  4. How to Open Applications With Root Privileges on a Mac Picture 4
    Open the application's package contents. If the quick way didn't work, locate the application in Finder. Right-click (or Control-click) its icon and select Show Package Contents from the drop-down menu.
  5. How to Open Applications With Root Privileges on a Mac Picture 5
    Find the executable file. You should now see one or more folders inside the application. Locate the executable file inside this folder. This is usually inside /Contents/MacOS.
    1. The executable often has the same name as the application, but it could have another name, such as "run.sh."
    2. The executable file icon is usually a black square with the word "exec" in small letters.
  6. How to Open Applications With Root Privileges on a Mac Picture 6
    Type sudo into Terminal. Type sudo followed by a space. Do not enter the command yet.
  7. How to Open Applications With Root Privileges on a Mac Picture 7
    Drag the executable file into the Terminal line. This should automatically insert the file path to the executable file.
  8. How to Open Applications With Root Privileges on a Mac Picture 8
    Confirm the command with your password. Hit Return. Enter the password for the administrator account you are logged into, and press Return again. The application should launch with root privileges.
Method 2 of 3:

From a Non-Admin Account

  1. How to Open Applications With Root Privileges on a Mac Picture 9
    Open Terminal in a non-admin account. Many system administrators prefer to work in an ordinary user account to limit the possible damage from mistakes or malware attacks.[4] This method still requires an administrator password, but allows you to gain temporary root access without having to switch users. To get started, open a Terminal window.
  2. How to Open Applications With Root Privileges on a Mac Picture 10
    Switch to an administrator within Terminal. Enter the command su - followed by a space and an administrator's username on this computer. Enter that administrator's password. You are now operating as that user.
    1. The hyphen in the command is optional, but recommended. It sets the environmental variables and directory to those of the admin user, which limits the chance of accidental damage.[5]
  3. How to Open Applications With Root Privileges on a Mac Picture 11
    Open the application using sudo. The typical usage is sudo "file path from hard drive to application.app/Contents/MacOS/application name". If this doesn't work or you need more guidance, refer to the administrator instructions above.
  4. How to Open Applications With Root Privileges on a Mac Picture 12
    Return to your own account. Once you've completed all tasks that require root privileges, enter exit in Terminal. This will exit the administrator user and return you to your normal account.
Method 3 of 3:

Troubleshooting

  1. How to Open Applications With Root Privileges on a Mac Picture 13
    Disable System Integrity Protection (High Risk). This feature, introduced in Mac OS 10.11 El Capitan, limits access to important files even for the root user.[6] If you are unable to make the desired changes, you can disable SIP. Only do this if you are confident in your ability and understand that a mistake could wipe your computer or make it nonfunctional:[7]
    1. Restart your computer. Hold down Command + R after you hear the start up noise to enter Recovery Mode.
    2. Select Utilities from the top menu, then Terminal.
    3. Enter csrutil disable; reboot in Terminal.
    4. Let the computer restart as usual. You can now use the steps above to open any application with full root privileges. When you are finished, consider repeating these instructions with enable instead of disable to reinstate SIP.
  2. How to Open Applications With Root Privileges on a Mac Picture 14
    Use nano instead of a graphical text editor. It may be safer and more reliable to edit configuration files using a text editor within Terminal. Nano is a simple option available by default. To use it with root privileges, just enter sudo nano followed by a space and the file path to your text document. You can then edit the document from within Terminal. When finished, press Control + O to save, then Control + X to quit nano.
    1. For example, sudo nano /etc/hosts will open the hosts file with root access.
    2. It's a good idea to make a backup before you edit any configuration files. To do this, enter sudo cp filepath_of_config_file new_filepath of backup. For example, sudo cp /etc/hosts /etc/hosts.backup creates a copy of the hosts file named hosts.backup. If you make a mistake, move the misconfigured file with (for example) sudo mv /etc/hosts /etc/hosts.bad and restore the backup with sudo cp /etc/hosts.backup /etc/hosts.[8]
4 ★ | 763 Vote

May be interested

  • What is the root directory?What is the root directory?
    the root directory, also called the root directory or sometimes is simply a root, of any partition is the highest directory in the hierarchy.
  • How to open CMD with Administrator rights on Win 10How to open CMD with Administrator rights on Win 10
    when applications such as command prompt (cmd) are run with administrator privileges, you will run the majority of commands without error. in this article, software tips will guide you how to open cmd with administrator rights on win 10.
  • Instructions for rooting Android phones with MagiskInstructions for rooting Android phones with Magisk
    root - the process of 'giving system access to certain applications and utilities' has long been an experience of some passionate users using android. but standing in front of the threat from an integrated feature in the operating system, called safetynet, a tool called magisk that allows you to root your device without activating safetynet.
  • Enhanced features Android does not need root with these 6 ADB applicationsEnhanced features Android does not need root with these 6 ADB applications
    a common misconception about adb is that it is only useful for developers or with a rooted device but that is not true. some third-party applications take advantage of adb to enable powerful features without root.
  • Instructions for root steps of Galaxy Note 5 phoneInstructions for root steps of Galaxy Note 5 phone
    if you want to remove unwanted bloatware on galaxy note 5 device or simply block ads on any application, or want to install incompatible applications ... you can do so. root your device.
  • Instructions to root Android easily and quickly - Experience new featuresInstructions to root Android easily and quickly - Experience new features
    after rooting your android phone, you have full system access and can run many types of applications that require root permissions.
  • A comprehensive guide to root the Samsung Galaxy S7 or S7 EdgeA comprehensive guide to root the Samsung Galaxy S7 or S7 Edge
    you can use the method below to root galaxy s7 or galaxy s7 edge. however, this method does not allow you to flash custom recovery or custom roms like the root process on the exynos version, but it allows you to manipulate some other interesting experiences such as xposed installation to customize the stock rom. and even run some scripts to optimize and remove bloatware from your galaxy s7.
  • Is root Android phone still a must-do?Is root Android phone still a must-do?
    root android phones have become a part of smartphones since it became popular. with a rooted phone, you will have control over important system administration functions, allowing you to customize the device to a higher level.
  • Instructions to disable Root account on LinuxInstructions to disable Root account on Linux
    if you're a linux user, you've probably heard the phrase 'root'. basically root is the account that has complete control of the entire linux system, which means that when using a root account you can change any settings on the system. this can cause extremely dangerous problems for system security, and advice if you are a 'high-end' user should use root.
  • How to Become Root in UbuntuHow to Become Root in Ubuntu
    to run administrative tasks in linux, you must have root (also known as superuser) access. having a separate root account is common in most linux distributions, but ubuntu disables root by default. this prevents users from making mistakes...