Use Apple Diagnostics to test your Mac
Apple Diagnostics, formerly known as Apple Hardware Test, can check your Mac for hardware issues.
If you think your Mac might have a hardware issue, you can use Apple Diagnostics to help determine which hardware component might be at fault. Apple Diagnostics also suggests solutions and helps you contact Apple Support for assistance.
Prepare your Mac
- Shut down your Mac.
- Disconnect all external devices except keyboard, mouse, display, Ethernet connection (if applicable), and connection to AC power.
- Make sure that your Mac is on a hard, flat, stable surface with good ventilation.
Start Apple Diagnostics
Determine whether you’re using a Mac with Apple silicon, then follow the appropriate steps:
Apple silicon
- Turn on your Mac and continue to press and hold the power button as your Mac starts up.
- Release when you see the startup options window, which includes a gear icon labeled Options.
- Press Command (⌘)-D on your keyboard.
Intel processor
- Turn on your Mac, then immediately press and hold the D key on your keyboard as your Mac starts up.
- Release when you see a progress bar or you’re asked to choose a language.
View the test results
Apple Diagnostics shows a progress bar while it’s checking your Mac:
When testing is complete, Apple Diagnostics shows the results, including one or more reference codes. Learn about Apple Diagnostics reference codes.
To repeat the test, click “Run the test again” or press Command-R.
To restart your Mac, click Restart or press R.
To shut down, click Shut Down or press S.
To get information about your service and support options, make sure that your Mac is connected to the internet, then click ”Get started” or press Command-G. Your Mac will restart to a webpage with more information. When you’re done, choose Restart or Shut Down from the Apple menu.
Learn more
On an Intel-based Mac, if you can’t start Apple Diagnostics with the D key, try these solutions:
- Press and hold Option-D at startup to use Apple Diagnostics over the internet.
- Make sure that your Mac isn’t using a firmware password.
Root User – Mac
https://support.apple.com/en-us/HT204012
How to enable the root user on your Mac or change your root password
Mac administrators can use the root user account to perform tasks that require access to more areas of the system.
The user account named ”root” is a superuser with read and write privileges to more areas of the system, including files in other macOS user accounts. The root user is disabled by default. If you can log in to your Mac with an administrator account, you can enable the root user, then log in as the root user to complete your task.
The root user account is not intended for routine use. Its privileges allow changes to files that are required by your Mac. To undo such changes, you might need to reinstall your system software. You should disable the root user after completing your task.
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.
Enable or disable the root user
- Choose Apple menu () > System Preferences, then click Users & Groups (or Accounts).
- Click lock icon, then enter an administrator name and password.
- Click Login Options.
- Click Join (or Edit).
- Click Open Directory Utility.
- Click lock icon in the Directory Utility window, then enter an administrator name and password.
- From the menu bar in Directory Utility:
- Choose Edit > Enable Root User, then enter the password that you want to use for the root user.
- Or choose Edit > Disable Root User.
Log in as the root user
When the root user is enabled, you have the privileges of the root user only while logged in as the root user.
- Choose Apple menu > Log Out to log out of your current user account.
At the login window, log in with the user name ”root” and the password you created for the root user. - If the login window is a list of users, click Other, then log in.
- Remember to disable the root user after completing your task.
Change the root password
- Choose Apple menu () > System Preferences, then click Users & Groups (or Accounts).
- Click lock icon, then enter an administrator name and password.
- Click Login Options.
- Click Join (or Edit).
- Click Open Directory Utility.
- Click lock icon in the Directory Utility window, then enter an administrator name and password.
- From the menu bar in Directory Utility, choose Edit > Change Root Password…
- Enter a root password when prompted.