How to Open Apps as Root on Mac
On the admin account
Know about risks. Most graphical applications are not designed with high-level access in mind. Limit yourself to specific tasks you understand well, otherwise you'll leave data inaccessible, applications crashing, or open security vulnerabilities.
Open Terminal. Log in to your administrator account on the computer. Go to Applications → Utilities and launch Terminal.
The administrator account must have a non-empty password, otherwise Terminal will not allow you root access.
Try a faster way. The sudo command allows us to launch applications with root access, but this requires a path to the executable file in the application package. Most Mac apps, along with many third-party programs, have a similar way of organizing their content in packages, so you should try this:
Type sudo " file path from hard drive to application .app/Contents/MacOS/ application name ".
For example, to open iTunes, you type sudo "/Applications/iTunes.app/Contents/MacOS/iTunes" and press ⏎ Return.
Enter the administrator account password that you usually log in to. Press ⏎ Return.
If the command works, the app will open with root access. If Terminal says "command not found", continue to the next step.
Open the contents of the application package. If quick opening doesn't work, search for the app in Finder. Right-click (or tap Controland click) on the application icon and select Show Package Contents from the drop-down menu.
Find the executable file. You will see one or more folders inside the application. Look for the executable file in the directory. This file is usually located in the /Contents/MacOS path.
The executable file usually has the same name as the application, but can also have a different name, such as "run.sh."
Executable files usually have a black square icon with a small "exec" inside.
Enter the sudo command into Terminal. Type sudo followed by a space. Don't enter right away.
Drag the executable file and drop it into the Terminal command line. The path to the executable file will be inserted automatically.
Confirm command with password. Press ⏎ Return. Enter the administrator account password you used to log in, click ⏎ Returnagain. The application will launch with advanced access.
On a non-admin account
Open Terminal with a non-admin account. Many administrators prefer to work on regular user accounts to limit the possibility of errors or malware attacks. This method still requires an administrator password, but allows you to gain temporary super access without switching accounts. To get started, open a Terminal window.
Switch to administrator rights on Terminal. Enter the command su - followed by a space and the computer's administrator account username. Enter the password of this administrator account. So you will act as that user.
Hyphens in commands are optional, but recommended. It sets the environment and directory variables for this admin user and will limit the possibility of accidentally causing errors.
Open the application using the sudo command. The most common way to do this is to type sudo " file path from hard drive to application .app/Contents/MacOS/ application name ". If this doesn't work, or you need more guidance, see the instructions for using an administrator account above.
Return to your account. After you complete the tasks that require root access, enter exit on Terminal. This command will exit the administrator account and return to your regular account.
Resovle problem
Disable System Integrity Protection (SIP). This feature (introduced in Mac OS 10.11 El Capitan) will limit access to important data even for advanced users. If you can't make the changes you want, disable SIP. Note that the risks for this method are very high. You should only apply this if you feel confident in your abilities and remember that if an error occurs, the computer will be wiped clean, or even unable to function:
Restart the computer. Hold down ⌘ Command+ Rafter you hear the startup sound to access Recovery Mode.
Select Utilities from the top menu, then Terminal.
Type csrutil disable; reboot into Terminal.
Let the computer restart as usual. Now you can apply the above steps to open any application with root permissions. Once completed, consider re-executing these instructions with the enable command instead of disable to restore SIP.
Use nano instead of a graphical text editor. This option will be more secure and reliable in editing configuration files with a text editor right on Terminal. Nano is the simple option available by default. To use this feature with root access, simply type sudo nano, followed by a space and the path to the text document. You can then edit documents right in Terminal. When finished editing, press Control+ Oto save and then press Control+ Xto exit nano.
For example, the command sudo nano /etc/hosts will open the hosts file with root access.
You should create a backup before editing any configuration files. To do this, enter sudo cp filepath_of_config_file new_filepath of backup . For example, the command sudo cp /etc/hosts /etc/hosts.backup will create a backup of the hosts file with the name hosts.backup. If you make a mistake, you can move the misconfigured file with the command sudo mv /etc/hosts /etc/hosts.bad (for example with the hosts.backup file) and restore the backup with the command sudo cp /etc/hosts.backup /etc/hosts.
You should read it
- A comprehensive guide to root the Samsung Galaxy S7 or S7 Edge
- Is root Android phone still a must-do?
- Instructions to disable Root account on Linux
- How to Become Root in Ubuntu
- Instructions to root Android easily and quickly
- How to enable root user on a Mac to take complete control of the device
- Root way of Android phones 7.0 / 7.1 Nougat with KingoRoot
- Top 15 best feature enhancement apps for Android
May be interested
- How to enable root user on a Mac to take complete control of the deviceapple has turned off root user access by default. if you still want to learn how to enable root user on macos, follow the instructions below.
- Root way of Android phones 7.0 / 7.1 Nougat with KingoRootandroid 7.0 / 7.1 nougat has been officially released for a while. as the latest operating system, many users wonder how to root android quickly and easily. kingo offers android users a safe, fast and rooted android phone.
- How to check if Android device is rooted or not?root checker is an application to check android devices, from the smartphone to the tablet has been rooted or not? or does root process succeed and work effectively?
- Root various Android devices with Kingo Android Rootroot is always an interesting topic for you to use android, and in this article i want to talk about a very new tool called kingo android root, called kingo for short. this is a windows-based tool, able to root for many different types of devices and the operation is quite simple.
- How to root your Android Nougat phone with SuperSUdid you decide to root the nougat android 7.0 device? supersu root android 7.0 is great software to access various android applications on rooted device. this article will guide the root steps of this android phone with this supersu.
- How to Become Root in Linuxthe 'root' account on a linux computer is the account with full privileges. root access is often necessary for performing commands in linux, especially commands that affect system files. because root is so powerful, it's recommended to...
- What is Root Certificate? How is it used for online monitoring?the abuse of root certificates is not just a problem in kazakhstan. internet users around the world should know about how this security tool is used to monitor online.
- How to Change the Root Password in Linuxthis wikihow teaches you how to change the linux root password if you have the current password or if you don't have access to the current root password. open a terminal window. to do so, press ,https://help.ubuntu.com/community/usingthe...
- Instructions for root steps of Galaxy Note 5 phoneif 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 for rooting Android phones with Magiskroot - 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.