Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active March 27, 2020 06:17
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 miguelmota/4af81b814b7fe40cd6532c266daf0631 to your computer and use it in GitHub Desktop.
Save miguelmota/4af81b814b7fe40cd6532c266daf0631 to your computer and use it in GitHub Desktop.
Linux mount usb drive for samba
$ sudo blkid
[sudo] password for mota:
/dev/nvme0n1p1: UUID="6f43daa0-e9b4-4e5d-b33f-4ea5fbf6e060" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ef1f993f-19a4-254a-8c4a-b01ec618b797"
/dev/nvme0n1p2: UUID="4300f7ca-195d-4cce-82c3-104c17eaba15" TYPE="swap" PARTUUID="c3d247f3-26d7-ab41-b6cf-d0b62b9c7b44"
/dev/nvme0n1p3: UUID="4A10-36AA" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a8705bd4-a629-f148-98fa-bdee82d2b8c5"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/sdb1: LABEL_FATBOOT="USBDRIVE" LABEL="USBDRIVE" UUID="C5C8-2A7D" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="d11f3b92-01"
sudo vim /etc/fstab
# append to /etc/fstab the following to auto-mount on boot:
/dev/sdb1 /mnt/myhd vfat rw,user,exec,umask=000 0 0
# don't use sudo
mount /dev/sdb1 /mnt/myhd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment