Skip to content

Instantly share code, notes, and snippets.

@ktatar
Created December 21, 2019 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktatar/29922b45ae0f35ef66ab92e0d5f77bd5 to your computer and use it in GitHub Desktop.
Save ktatar/29922b45ae0f35ef66ab92e0d5f77bd5 to your computer and use it in GitHub Desktop.
[Mount an external drive in ubuntu] Mount an external drive with read/write privileges. #ubuntu #shell
#!/bin/bash
#install hfsprogs if you don't have it
sudo apt-get install hfsprogs
#check the status of the drive
sudo fsck.hfsplus -f /dev/sdb2
#Mount the drive
sudo umount /media/tatar/MetaMusical
sudo mount -t hfsplus -o force,rw /dev/sdb2 /media/tatar/MetaMusical
sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 /media/tatar/MetaMusical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment