Using systemd to mount a hard drive by UUID

May 21, 2020 - Reading time: ~1 minute

Mounting a hard drive in systemd requires creating a .mount file in /etc/systemd/system/ folder.

I followed the instructions here --> https://www.thegeekdiary.com/how-to-auto-mount-a-filesystem-using-systemd/

My mount file is below:


[Unit]
Description=Nextcloud Data Mount

[Mount]
What=/dev/disk/by-uuid/82F6A048F6A03DF3
Where=/media/nextcloud
Options=uid=33,gid=33,fmask=0007,dmask=0007
Type=ntfs-3g

[Install]
WantedBy=multi-user.target


LazyCoderOZ

I am a Linux guy, been around for 20+ years using Linux as my daily driver.
This is my blog on my discoveries and notes so I don't forget how I have done things :)