Permanently Mounting The Disk
- Find the UUID of the Device:
lsblk -f #displays the UUID
sudo blkid #displays the UUID
- Create a Mount Point:
sudo mkdir /mnt/permanent-mount
- 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.
- Test the Mount Before Rebooting:
sudo mount -a
Temporarily Mounting The Disk
- 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