Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I list all the currently memory devices on MacOS X? I need to do this by command, because I have an Java application that needs this information.


share|improve this question
up vote 2 down vote accepted

You can use the native OS X diskutil command as shown below:

$ diskutil list
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            499.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             654.6 MB   disk0s3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.1 GB     disk1
   1:                 DOS_FAT_32 LACI                    8.1 GB     disk1s1

If you're doing this from the command line the following command would list the Volumes currently mounted and their mount point in the filesystem:

$ df | grep ^\/dev\/disk
/dev/disk0s2                      487542528 377409836 109876692  78% /
/dev/disk1s1                        7879680   1128124   6751556  15% /Volumes/LACI

If you're just interested in the physical disks:

$ df | grep -i ^\/dev\/disk | awk {'print $1'}

Or the mount points:

$ df | grep -i ^\/dev\/disk | awk {'print $6'} 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.