How to mount drive to a folder automatically on boot in linux

Опубликовано: 30 Апрель 2026
на канале: Hills Of Silence
74
1

In this video I show you how to mount drives in linux using the terminal. this is done by


Firstly you need to create a location which is usually located in the media directory;
to do this you need the following commands


cd /media
sudo mkdir (Whateveryouwant)


you then have to change the permissions this is done by these commands
sudo chown (nameofuser):(nameofuser) (nameofdirectorymade)


you then need the following commands to find out the correct info about your drive(s) you want to add
sudo fdisk -l
sudo blkid


you then add the drives to the fstab folder
sudo nano /etc/fstab


Here is my example addition the the fstab
UUID=d05831d9-5eb1-4078-8fd9-7d140191d3e5 /media/2tb ext4 defaults 0 0
UUID=(UUIDfoundinblkid) (mountpoint) (filesystem) defaults 0 0