I have a USB drive that I can see/access/modify/etc in Linux/Ubuntu but it doesn't show up on my Mac OSX.

I did sudo fdisk /dev/sdb (where my USB is) and then g to create a new GPT partition table, n to make a new partition, used all default settings, then w to save and exit.

Then I did sudo mkfs.fat -F32 /dev/sdb1 to format the partition with a FAT32 filesystem.

I ejected the USB and put it in my Mac and it doesn't show up / get detected.

What did I miss?

  • Try simple sudo mkfs.vfat /dev/sdb1 and don't forget unmount before and after ;) Nov 1, 2017 at 8:04
  • I think your problem was not specifying a Partition Type that macOS would recognise. I made an answer that works with an exFat formatted USB drive. Jun 20, 2021 at 15:39

2 Answers 2


To answer the original question:

This answer uses the exFat file system type instead of Fat32.

See this link for instructions about how to create an exFAT USB drive, from within Linux, that will show up in macOS, Linux and Windows.

Use lsusb and blkid -o list and df -h to work out the device block of your Linux attached USB drive (e.g: /dev/sdb)

  1. Install exfat utilities in Linux (e.g: Ubuntu in this case)

    sudo apt update && sudo apt install exfat-fuse exfat-utils

  2. Use fdisk to partition the USB drive.

    sudo fdisk /dev/sdb

  3. Create a new partition table and clear all current partition data.
    Type o at the prompt for a MBR partition table or g for a GUID Partition Table (GPT).

  4. Create a new partition (In this case ONE partition for the whole drive).
    Type n. It will ask for some values which you can simply press enter for the default values.

  5. Change the partition Type
    When you run fdisk in Linux OS a new partition is given the partition Type of Linux by default. macOS will not recognise that. To change the partition Type flag to exFat we have to type in the command t. Fdisk will now ask for a number indicating the flag you want to set. We want number 7 for HPFS/NTFS/exfat. (You can see all the flags by typing L).

  6. Save the Partition table information.
    Write the settings to the USB drive by typing the command w in fdisk.

  7. Create a filesystem (exFat).
    Now we have a partition but no filesystem yet so make one like this:
    sudo mkfs.exfat /dev/sdb1

Now data you save to this drive will be available in macOS, Windows and Linux

  • If anyone is still having issues, this answer helped me format my USB drive with two small changes: in step 3. I use g for the GUID Partition Table (GPT) and not o for the MBR partition table and in step 5. I use number 11 which is Microsoft basic data instead of HPFS/NTFS/exfat. My USB drive can now be read by both, Linux and MacOS.
    – xabdax
    Feb 21 at 18:34

If you are using MAC

  • Open Disk Utility from Lauchpad
  • Select Your USB Disk Form top left corner

enter image description here

-Select Partition Option

enter image description here

-Crate choose 1 Partition fill Name, and Format details

enter image description here

-Then Click apply

enter image description here

-Wait till it the details

-Then select Disk Partition and Erase It.

enter image description here

enter image description here

After completing these steps you can access your USB drive on MAC, Hope this will help you.

  • 1
    Mahesh, OP uses Linux to format USB which Mac cannot see then. He doesn't need instructions on how to format USB drive on Mac... :) Nov 1, 2017 at 7:39
  • Sorry, My bad :( , I also some times ago had same problem, it did not solved by formatting on linux, but solved by formatting on MAC Nov 1, 2017 at 7:41
  • You are correct, this could be the solution :))) Nov 1, 2017 at 7:47
  • @DenisRasulev :) Nov 1, 2017 at 7:48
  • I can get it to work if I format it on the Mac but this doesn't explain why it doesn't work from Linux
    – user261985
    Nov 1, 2017 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .