Shut down system without superuser permission
Using pmset or any system tools to perform shutdown requires sudo.

You can ask macOS to shut down from the user's account by telling System Events using AppleScript. You can run AppleScript from the command line by using osascript.

osascript -e 'tell app "System Events" to shut down'


This will fail if another user is logged in since this always requires authentication, matching what occurs if the user chooses Shut Down from the Apple menu.

For commands to perform other power-related actions, see


Using The Terminal Command to Shutdown, Restart and Sleep My Mac?