I am using Ubuntu Minimal + LXDE. I am wondering how can I auto-mount a partition (internal) on boot automatically. Currently I do something like

mount /dev/sda3 /media/works

But I want it to be permanent. Also I have GParted, but the Partition > UnMount is greyed out (yes, unmount, even though I haven't mounted it)

  • How does the mount command not have a flag to just persist the mount after a reboot? Incredible. Oct 19, 2021 at 22:30

2 Answers 2


Unmount is greyed out because the partition isn't there to be unmounted. You haven't mounted it yet.

To make the partition auto-mount, first find out the UUID of /dev/sda3 by doing:

sudo blkid

I'll assume you're using ext4 on /dev/sda3. Open up gedit like so:

sudo -H gedit /etc/fstab

(Or, in the command line, sudo vim or sudo nano instead of gksudo gedit.)

Now you want to add a line to the bottom of that file. It should look something like this (UUID will be different):

UUID=03ec5dd3-45c0-4f95-a363-61ff321a09ff /media/works ext4 defaults  0      2

For more info on fstab, this is a good resource.

  • I have to mount 2 partitions(sda5 and sda6). Both are ntfs. How can I do it ?
    – TomJ
    Jun 4, 2014 at 14:08
  • Is a reboot required?
    – jjxtra
    Aug 28, 2019 at 19:01
  • A reboot is not reqiured, you can use mount -a. Beware that depending on the filesystem type, this may mount it with different user or permissions than what you may need.
    – jjmontes
    Oct 31, 2019 at 14:50
  • This broke my Debian 11. Could'nt even boot in recovery mode. I had to boot with a Ubuntu USB stick in live mode, and restore the fstab file. which I had saved a copy of before making the changes.
    – BERA
    Dec 18, 2021 at 9:16

Use Disks utility. Select the disk, then click Additional partition options icon. Choose Edit Mount Options from drop-down menu.

  • 1
    This is definitely the simplest way with modern operating systems Aug 1, 2019 at 17:47
  • This saved me a lot of time, thank you. Mar 24, 2020 at 17:54
  • Amazing man! This is quite helpful. Apr 24 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.