![Forrest logo](/images/logo.png)
diskutil:tldr:e9a27
The command "diskutil unmountDisk ${-dev-disk_device}" is used in the macOS Terminal to unmount a disk or storage device connected to your computer.
Let's break down the command:
-
"diskutil": This is the command-line utility in macOS used for managing disks, volumes, and partitions.
-
"unmountDisk": This is a subcommand of "diskutil" used to unmount a disk device. When you unmount a disk, it is no longer accessible by the system or applications, but it remains physically connected to the computer.
-
"${-dev-disk_device}": This is a placeholder for the disk device identifier. In macOS, disk devices are identified using a unique identifier such as "disk1", "disk2", etc. The "${-dev-disk_device}" is replaced by the actual device identifier when executing the command. For example, if the device identifier is "disk1", the command would be: "diskutil unmountDisk disk1".
By running this command in the Terminal, you can unmount the specified disk device and ensure it is no longer accessible until it is remounted.