Tutorial: mount an usb stick

Howto permanently mound an usb stick:

  1. Find attached disk

    fdisk -l | grep sda
    Disk /dev/sda: 15.1 GiB, 16225664512 bytes, 31690751 sectors
    /dev/sda1  *        2048 30267391 30265344 14.4G  c W95 FAT32 (LBA)
    /dev/sda2       30269438 31688703  1419266  693M  5 Extended
    /dev/sda5       30269440 31688703  1419264  693M 82 Linux swap / Solaris
    
  2. Create folder to mound disk

    sudo mkdir /media/scandisk
    
  3. Find UUID of usb-stick

    sudo blkid
    /dev/mmcblk0p1: UUID="dc33650f-87c5-42aa-b9fe-27e64645c2b5" TYPE="ext4" PARTUUID="e9ee5af1-01"
    /dev/loop0: UUID="afe0d94f-9b99-4a5e-ad82-62daae3c5151" TYPE="ext4"
    /dev/mmcblk0: PTUUID="e9ee5af1" PTTYPE="dos"
    /dev/sda1: LABEL="SCANDISK" UUID="D660-68D0" TYPE="vfat" PARTUUID="0006c84c-01"
    /dev/sda5: PARTUUID="0006c84c-05"
    /dev/mapper/docker-179:1-395364-pool: UUID="afe0d94f-9b99-4a5e-ad82-62daae3c5151" TYPE="ext4"
    /dev/mapper/docker-179:1-395364-e7f96767ac55cf374a0c5ee2d2330934c0d148d62964217ddb81f924e5f8cb81: UUID="afe0d94f-9b99-4a5e-ad82-62daae3c5151" TYPE="ext4"
    

    Identify the disk by "lable" and copy the "uuid".

  4. Add the usb-stick or usb-drive to the fstab to auto mount it

    sudo nano /etc/fstab
    Add:
    UUID=D660-68D0 /media/scandisk vfat defaults 0 0
    
  5. Parameters for different types of disks:

    FAT32
    UUID=D660-68D0 /media/scandisk vfat utf8,noatime 0
    
    NTFS
    UUID=D660-68D0 /media/scandisk ntfs-3g utf8,noatime 0
    
    HFS+
    UUID=D660-68D0 /media/scandisk hfsplus utf8,noatime 0
    
    exFAT
    UUID=D660-68D0 /media/scandisk exfat utf8,noatime 0
    
    ext4
    UUID=D660-68D0 /media/scandisk ext4 defaults 0
    
  6. Remount all disks

    sudo mount -a