Mac: Option+Command+C; Linux: Ctrl+Shift+C; Enter commands in the text area. Enter commands without quotes. The commands are case-sensitive, so be sure to enter commands exactly as shown. Use commas to separate multiple commands on the same line. Make sure you quit and restart the apps to see the changes and if you want to reverse anything, simply substitute. (for example if you're going to sell your Mac), then execute the following command: diskutil secureErase freespace 3 /Volumes/name-of-drive. Aug 13, 2017 By the way, the shutdown command can also be also be used to restart a Mac from the command line by using the -r flag instead of the -h flag. Keep in mind that for most users the command line approach is not going to be better or faster than accessing the Apple menu Shut Down option or using the power button keyboard shortcuts, this is really aimed at advanced users who are already at.
Use kickstart to set Apple Remote Desktop preferences. For example, you can install, uninstall, activate, set up, and restart Apple Remote Desktop components.
Learn how to control a remote Mac with Screen Sharing with the kickstart command-line utility in macOS Mojave 10.14 and later.
Get started
You can find the kickstart tool at:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart
Mac Command Line List
Type the commands in this article as one line of text. If the text wraps as you enter it, that's fine. Don’t press the Return key until you’ve entered the entire command.
![How to restart from command prompt How to restart from command prompt](/uploads/1/2/6/4/126497040/507593260.gif)
For more information about the kickstart command, use the -help flag:
Sample commands
The commands in this article work with Apple Remote Desktop 3.2 and later.
Here are commands that you can use:
Terminal Command To Restart Mac
- Restart the ARD Agent and helper:
- Turn on Remote Desktop Sharing, allow access for all users, and enable the menu extra:
- Turn on Remote Desktop Sharing, allow access for specified users:
You must use the -configure, -access, and -privs options in a separate command to specify the set of users and their access privileges. For example, this command is for users with the short names 'teacher' and “student.' It gives them access to observe (but not control) the computer, and to send text messages:
Unlike other kickstart options, you can’t combine the allowAccessFor options with other kickstart options. You must use it as in the last two samples above. You might have to call kickstart more than once to finish a computer’s setup. - Remove access privileges for specified users ('student' in this example):
- Disable ARD Agent and remove access privileges for all users: