What commands do i use in macOS Terminal to mount my disk?

What commands do i use in terminal to mount my disk


[Re-Titled by Moderator]

MacBook Air 13″, macOS 12.6

Posted on Dec 30, 2023 6:44 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 30, 2023 7:51 PM

How to Mount a Drive from the Command Line on Mac

If you can unmount a drive, of course you can mount or remount one too. The command sequence is very similar; locate the volume, then mount the drive.

1: Find the Drive to Mount

If you already know where the volume is located, you can ignore part 1 and jump straight to part 2, but let’s cover retrieving the volume identifier anyway. This time around we’ll shorten it a bit because we’ll assume we know the name of the drive to mount, thus we only need to locate the identifier. We’ll do this by using grep to shorten the output of the diskutil command like so:

$ diskutil list |grep OSXDaily

2: Apple_HFS OSXDaily 15.7 GB disk1s2

That output is obviously much shorter than the full output of diskutil list which we showed above.

For this example, the drive “OSXDaily” is still located at /dev/disk1s2 and that’s what we’ll mount.

2: Mount (or Remount) the Drive

To mount (or remount) a drive, we’ll use the same diskutil command with a new flag and inputs like so:

diskutil mount /dev/disk1s2

Using the same examples as elsewhere, here is what the command and the output will look like:

$ diskutil mount /dev/disk1s2

Volume OSXDaily on /dev/disk1s2 mounted

This obviously mounts the drive again, and it will also make the mounted volume visible again in the Mac OS X Finder and to GUI-based apps in the various Open or Save dialog boxes.

https://osxdaily.com/2013/05/13/mount-unmount-drives-from-the-command-line-in-mac-os-x/

2 replies
Question marked as Top-ranking reply

Dec 30, 2023 7:51 PM in response to maree29

How to Mount a Drive from the Command Line on Mac

If you can unmount a drive, of course you can mount or remount one too. The command sequence is very similar; locate the volume, then mount the drive.

1: Find the Drive to Mount

If you already know where the volume is located, you can ignore part 1 and jump straight to part 2, but let’s cover retrieving the volume identifier anyway. This time around we’ll shorten it a bit because we’ll assume we know the name of the drive to mount, thus we only need to locate the identifier. We’ll do this by using grep to shorten the output of the diskutil command like so:

$ diskutil list |grep OSXDaily

2: Apple_HFS OSXDaily 15.7 GB disk1s2

That output is obviously much shorter than the full output of diskutil list which we showed above.

For this example, the drive “OSXDaily” is still located at /dev/disk1s2 and that’s what we’ll mount.

2: Mount (or Remount) the Drive

To mount (or remount) a drive, we’ll use the same diskutil command with a new flag and inputs like so:

diskutil mount /dev/disk1s2

Using the same examples as elsewhere, here is what the command and the output will look like:

$ diskutil mount /dev/disk1s2

Volume OSXDaily on /dev/disk1s2 mounted

This obviously mounts the drive again, and it will also make the mounted volume visible again in the Mac OS X Finder and to GUI-based apps in the various Open or Save dialog boxes.

https://osxdaily.com/2013/05/13/mount-unmount-drives-from-the-command-line-in-mac-os-x/

Dec 30, 2023 7:48 PM in response to maree29

You should not need Terminal to mount any disk.


When your Mac boots, any disk that is connected to your Mac should automatically mount. Same if you connect a disk while your Mac is running. (Of course, that assumes that your external disks are either bus-powered or self-powered & turned on.)


If you ejected a disk that is still physically connected to your Mac, you can remount it using Disk Utility.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

What commands do i use in macOS Terminal to mount my disk?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.