100

I am using Terminal and have looked through directories.

I just can't find where my USB drive its directory is.

Which directory is my USB drive mounted in?

jmlumpkin
  • 8,795
LiJung
  • 1,317

7 Answers7

123

All drives (internal, external and networked) get mounted in /Volumes. You should see a folder there with the name of your USB drive as it appears on your desktop or in the Finder.

robmathers
  • 41,194
  • 9
    More generally, you can use the mount command to see all the mounted volumes and where they are mounted. (Only a subset are mounted in /Volumes.) – Chris Page Aug 11 '12 at 00:40
  • AFAIK both external storage devices and .dmg files are mounted in /Volumes, at least by default. What other subset are you referring to here? – nohillside Nov 04 '12 at 08:21
  • 2
    You can also drag&drop the usb drive from the Finder to the Terminal to get its path ;-) – yves amsellem Oct 15 '14 at 09:57
  • I plugged in a USB drive and did ls /Volumes and a new folder had popped up for my USB thumb drive called NO NAME. That's the one for me! Thanks. – Gabriel Staples May 15 '23 at 05:56
24

Some techniques to try:

ls -a /Volumes

or...

ls -l /Volumes

or...

ls -la /Volumes

...may prove useful.

mount

seems to give all the partitions that might be useful with Disk Utility, during formatting, etc.

you can probably reach your USB drive directly using:

/Volumes/<NameOfYourDrive>

This applies to other types of drives as well: optical, internal and external hard drives. All mounted volumes.

dmcycloid
  • 371
  • 1
    Strange how you can't right-click on the Finder-view icons or even the desktop-icon for additional properties including the file-paths for external media-drives connected to a device running macOS Catalina; you can access file-folder paths and other properties from said locations in Ubuntu 18.04. – alexanderjsingleton Oct 30 '19 at 14:53
14

In general, to find where something is mounted, you can run this command from the terminal:

df -H 

This also provides useful information about the space on the drive.

  • 1
    After I plugged in my USB thumb drive, my df -h showed a new entry at the very bottom, with a mount point of /Volumes/NO NAME. That's my USB drive I just plugged in! – Gabriel Staples May 15 '23 at 05:57
5
  1. I like to use three native utilities all in one go, just to be thorough and get all the details.

in:

diskutil list; df -Hl; echo; mount
out:
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            499.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk0s2 499G 490G 8.9G 99% 2582670 4292384609 0% /

/dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse)


  1. If you don't want a lot of information, you can just check for mounted disk partitions in /dev:

in:

ls /dev/disk*
out:
/dev/disk0      /dev/disk0s1    /dev/disk0s2    /dev/disk0s3

  1. To list ownership and permissions, etc :

in:

ls -alh /dev/disk*
out:
brw-r-----  1 root  operator    1,   0 29 Oct 11:24 /dev/disk0
brw-r-----  1 root  operator    1,   1 29 Oct 11:24 /dev/disk0s1
brw-r-----  1 root  operator    1,   3 29 Oct 11:24 /dev/disk0s2
brw-r-----  1 root  operator    1,   2 29 Oct 11:24 /dev/disk0s3

voices
  • 2,209
1

You could also try this command in terminal to get more hardware info on your USB devices

system_profiler SPUSBDataType

This will produce an output like this:

USB 3.0 Bus:

Host Controller Driver: AppleUSBXHCISPTLP PCI Device ID: 0x9d2f PCI Revision ID: 0x0021 PCI Vendor ID: 0x8086

USB3.0 Hub:
  Product ID: 0x0813
  [...]

USB2.0 Hub:

  Product ID: 0x2813
  [...]

    STORE N GO:

      Product ID: 0x0302
      [...]
      Media:
        STORE N GO:
          Capacity: 15,53 GB (15.525.216.256 bytes)
          Removable Media: Yes
          BSD Name: disk4
          Logical Unit: 0
          Partition Map Type: MBR (Master Boot Record)
          S.M.A.R.T. status: Verified
          USB Interface: 0
          Volumes:
            Install macOS Catalina:
              Capacity: 15,5 GB (15.499.132.928 bytes)
              Free: 7,18 GB (7.176.282.112 bytes)
              Writable: Yes
              File System: Journaled HFS+
              BSD Name: disk4s1
              Mount Point: /Volumes/Install macOS Catalina
              Content: Apple_HFS
              Volume UUID: 3D469C8E-1F35-341D-95A8-0B16EDE21B29

    USB 2.0 BILLBOARD             :

      Product ID: 0x0100
      [...]

Where you can appreciate the mounting point of your USB device:

Mount Point: /Volumes/Install macOS Catalina (in my case it's a Catalina OS install pendrive)

nohillside
  • 100,768
  • How can this command be used to solve the problem described in the question? – nohillside May 30 '15 at 06:08
  • 1
    This is useful to developers like myself who are trying to specifically differentiate a USB thumbdrive of unknown name from other mounted volumes. This could happen for example, in systems that can be overridden by alternate settings stored on a thumbdrive, IF the thumbdrive is present. In this case I want to not care what the volume is named, I just want to find whatever thumbdrive(s) is present. – Dave Dec 21 '16 at 22:41
  • @nohillside if you run the command with a USB pendrive on, you will find a part where it mentiones the pendrive and the mounting point. – mariano-daniel Nov 09 '22 at 04:04
  • 1
    @mariano-daniel Explaining how this can be done might make a worthwhile edit to the answer. – nohillside Nov 09 '22 at 08:34
  • @nohillside totally agree with you. – mariano-daniel Nov 09 '22 at 14:00
  • 1
    @mariano-daniel One of the great things about StackExchange sites is that everybody can edit any content. So if you see a way to improve the question please go ahead and do so. – nohillside Nov 09 '22 at 14:55
  • @nohillside alright! You convinced me to do my first edit on SE, haha! Let's hope it helps. At least I tried. Thanks for the encouragement! – mariano-daniel Nov 11 '22 at 01:17
  • 1
    @mariano-daniel Great. I shortened the output a bit to make it easier to spot. – nohillside Nov 11 '22 at 06:36
0

Try lsusb. It was given me by Erik Kaashoek; he is the designer of the tinySA and the Ultra tinySA.

The command works great as it only lists USB devices.

Allan
  • 101,432
LarryS
  • 1
  • 2
    I have edit your answer and removed the “replies.” This site is a Q&A site and not a threaded forum. It might be useful to take the [tour] to familiarize yourself with how the site works. Finally, can you [Edit] your answer with links to the utility you referenced? – Allan Dec 29 '22 at 22:59
-2

easy peezy lemon squeezy.

cd /volumes/whatever-the-name-of-volume

if that doesn't work then do it step by step

cd /volume and then cd into whatever the name is of the device.

22.
  • 5
  • 1