Permanently Mounting The Disk

  1. Find the UUID of the Device:
lsblk -f #displays the UUID
sudo blkid #displays the UUID
  1. Create a Mount Point:
sudo mkdir /mnt/permanent-mount
  1. Edit the /etc/fstab:
sudo nvim /etc/fstab

Add this line at the bottom:

UUID=your-uuid-here  /mnt/permanent-storage  ext4  defaults  0  2
  • Replace your-uuid-here with the actual UUID from step 1.
  • Replace /mnt/permanent-storage with your mount point.
  • Replace ext4 with your filesystem type if different.
  • defaults are standard mount options.
  • 0 means the partition will not be backed up with the dump utility.
  • 2 means the partition will be checked by fsck after the root filesystem.
  1. Test the Mount Before Rebooting:
sudo mount -a

Temporarily Mounting The Disk

  1. Create a Mount Point and Mount the Disk Here:
sudo mkdir /mnt/temp-storage #make sure to create directory and it can be created and mounted anywhere
sudo mount /dev/sda1 /mnt/temp-storage 

Note: Never unplug/remove the device without un-mounting it from the system.

sudo umount /mnt/temp-storage