Skip to content

Instantly share code, notes, and snippets.

@post2web
Last active November 7, 2017 04:58
Show Gist options
  • Save post2web/dbfda498fe8ebbb767158294af53f8bd to your computer and use it in GitHub Desktop.
Save post2web/dbfda498fe8ebbb767158294af53f8bd to your computer and use it in GitHub Desktop.
ubuntu mount external drive journaled filesystem
## list all drives and find /dev/sdXY for the external
sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
## Install hfsprogs to read HFS+ (apple's file system)
sudo apt-get install hfsprogs
## mount
sudo mount -t hfsplus -o force,rw /dev/sdXY /media/external
## or
sudo mount -t exfat -o force,rw /dev/sdXY /media/external
## if the drive was improperly unmounted or a little corrupted
# sudo fsck.hfsplus -f /dev/sdXY
## to unmount
# sudo umount -f /media/external
## to edit the partitions
# fdisk /dev/sda
## to format ntfs:
# sudo mkfs.ntfs --fast /dev/sdg2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment