Trying to format USB (using Linux/fdisk) so it shows up on my Mac

Solution 1:

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