

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none hfs rw,noauto Now copy and paste the following line into the document:

Press the “A” key to bring up the cursor and, using the “Down Arrow” key and a final press of the “Enter” key, navigate down the document to below the lines marked with the # symbol, and above the lines marked with the ~ symbol. It will return a string titled “Volume UUID”.ģ) Copy this long string and paste it somewhere, then repeat the command for all the other partition names you want, pasting their UUIDs somewhere safe too.ĥ) Enter your administrator password when prompted. An empty editable document will then appear in the Terminal window. Replace “Volume Name” with the name of the partition you want to stop from mounting, making sure to retain the speech marks if your volume name contains spaces or punctuation. At the prompt, paste the command:ĭiskutil info /Volumes/"Volume Name" | grep 'Volume UUID' First, connect the drives and mount the partitions which you do not want to mount automatically in future.Ģ) Next, launch Terminal (found in /Applications/Utilities, or with Spotlight).
Force unmount disk mac terminal how to#
This guide will detail how to ensure only the drives of your choosing mount automatically, leaving the rest unmounted within macOS.ġ) To prevent partitions from mounting automatically we are going to add their UUIDs to a list via Terminal. It also takes time for the drives to mount on every boot and unmount on sleep or shutdown. Add to this a couple of external hard drives with partitions for storage, OS installers and Time Machine backups for other computers, and your desktop and Finder sidebar can begin to look a real mess.
Force unmount disk mac terminal for windows 10#
Whilst this behaviour is useful for the novice or for those connecting a single USB stick to copy some files, it can become unwieldy and even annoying if you have many multi-partitioned drives attached to your Mac.įor example, my desktop Hackintosh has three internal drives, each with at least two partitions, and one of these drives is not even needed when booted under macOS – it is for Windows 10 and Linux.

With the exception of partitions in unreadable formats and certain hidden partitions such as EFI and Recovery HD, the default behaviour of macOS is to mount all partitions of a drive on boot-up, login, or on connecting an external drive.
