Unexpected shutdowns are more often related to the power supply starting to fail. One thing you can try is to reset the power management, which is called 'PMU' or 'SMC,' depending on your specific Mac mini model.
Close all Mac OS X apps before shutting down. Try to determine if one particular app is causing the problem. Maybe one app always aborts the shutdown process. Try updating to the latest version. Open Disk Utility. Choose the your main hard drive and click Repair Disk. Choose the Apple key→Shut Down. A dialog box appears, asking whether you’re sure you want to shut down. Click Cancel or Shut Down. (If you don’t click either option, your Mac will shut down automatically after a few minutes.) Press Control+Eject (or press the power button). When a dialog box appears, click the Shut Down button.
If it's Intel-based, this is the procedure

If it's PowerPC-based (a G4), this is the procedure
How To Force Shutdown Mac
You should disconnect ALL cables when you do this. When you connect it back to power, if you were using a power strip of some type (especially if it's old or overcrowded), connect it directly to a wall outlet by itself (at least initially). Don't connect any peripherals except standard keyboard and mouse (and display). Use it that way for a while and see if there is any improvement.
Mac Shutdown Terminal
If it's working better, it may be because of the PMU/SMC reset, or possibly because there was some conflict related to having the peripherals connected (or a faulty device). Add those devices back one at a time, to see if the problem recurs.


In case it is related to overheating, you should check the vents along the bottom for accumulation of dust blocking airflow.
Mac Shutdown Command
Jul 10, 2012 2:16 PM
If your Mac desktop or Mac laptop is acting sluggish or programs are failing to run, you need to know how to restart your Mac computer. Restarting or rebooting your Mac essentially clears your computer’s memory and starts it up fresh. When you restart your computer, your Mac closes all running programs and offers to save any files you’re working on. After you choose to save any files, your Mac will finally boot up again.
To restart a Mac computer, you have three choices:
- Press the power button (or press Control+Eject) and, when a dialog box appears, click the Restart button.
- Choose the Apple key and then click Restart.
- Press Control+Command+Eject (or Control+Command+Power button).
Mac Mini App Shutdown Windows 10
Pressing the Control+Command+Eject/Power button is the most reliable way to restart a Mac because it doesn’t rely on the Mac OS X operating system.
Restarting a Mac computer isn’t the same as turning the computer on and off, which completely resets it. If you really want to make sure that your computer starts up correctly, turn it off, wait a few seconds, and then turn it on again. If you’re in a hurry, try restarting your Mac, and if that doesn’t fix the problem, you’ll have to turn it off and on again.
Mac Mini App Shutdown App
If your Mac freezes, restarting might not work. If your Mac is generally acting weird, restarting isn’t your only option. Macs are known not to need a lot of maintenance or troubleshooting, but if restarting (or rebooting) doesn’t work, consider some other basic troubleshooting options for your Mac.