mount usb disk terminal

I have macOS ventura


I need USB external disk at command line "terminal".


Like this

➜ $ sudo mkdir -p /Volumes/USB
Password:
➜ $ diskutil mount -mountPoint /Volumes/USB /dev/disk2s1
Volume TOSHIBA EXT on /dev/disk2s1 mounted
➜  $ diskutil info /dev/disk2s1 | grep Mounted       
  Mounted:          No


But even though the command is correct, and its output is that if you mount it you don't mount it, I don't know if it's an additional restriction


Thanks

MacBook Pro (2017 – 2020)

Posted on Jun 7, 2023 3:00 PM

Reply
Question marked as Top-ranking reply

Posted on May 2, 2024 7:23 AM

Actually it would be better to change ownership of the newly created "USB" folder at "/Volumes/USB" to the macOS user or the OP may not be able to save files there, but this could be problematic if the OP wishes multiple users to access that mount point. Should be able to be done from the Finder with "Get Info", but can be achieved with the command line (using the info in the OP's post):

sudo  chown  $USER  /Volumes/USB


Better yet would not to create any folder in "/Volumes" since you will encounter permissions issues and will need to manually delete that "USB" folder since it will still around since it was manually created. Just let Disk Utility automatically mount the external volumes using the given name of the volume "TOSHIBA EXT" instead, or by using the following command which does not even require "sudo" (given the information in the OP's post):

diskutil  mount  disk2s1


If a custom name is desired, then just rename the "TOSHIBA EXT" volume instead.



3 replies
Question marked as Top-ranking reply

May 2, 2024 7:23 AM in response to hung-chifromsunnyvale

Actually it would be better to change ownership of the newly created "USB" folder at "/Volumes/USB" to the macOS user or the OP may not be able to save files there, but this could be problematic if the OP wishes multiple users to access that mount point. Should be able to be done from the Finder with "Get Info", but can be achieved with the command line (using the info in the OP's post):

sudo  chown  $USER  /Volumes/USB


Better yet would not to create any folder in "/Volumes" since you will encounter permissions issues and will need to manually delete that "USB" folder since it will still around since it was manually created. Just let Disk Utility automatically mount the external volumes using the given name of the volume "TOSHIBA EXT" instead, or by using the following command which does not even require "sudo" (given the information in the OP's post):

diskutil  mount  disk2s1


If a custom name is desired, then just rename the "TOSHIBA EXT" volume instead.



Jun 7, 2023 3:56 PM in response to fa61an

fa61an wrote:

I have macOS ventura

I need USB external disk at command line "terminal".

Like this
➜ $ sudo mkdir -p /Volumes/USB
Password:
➜ $ diskutil mount -mountPoint /Volumes/USB /dev/disk2s1
Volume TOSHIBA EXT on /dev/disk2s1 mounted
➜  $ diskutil info /dev/disk2s1 | grep Mounted       
  Mounted:          No

But even though the command is correct, and its output is that if you mount it you don't mount it, I don't know if it's an additional restriction

Thanks


Is that an intended blank space in the path?

diskutil mount -mountPoint /Volumes/USB /dev/disk2s1


compare

diskutil mount -mountPoint /Volumes/USB/dev/disk2s1



Is Terminal included in the Full Disk Access folder?


>System Setting>Privacy & Security>Full Disk Access


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.

mount usb disk terminal

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