How do I hide / remove a partition from the Nautilus left panel?

Solution 1:

You can use the mount option x-gvfs-hide in /etc/fstab to hide it in nautilus, for example.

For example, a line in /etc/fstab would become:

/dev/sda1 /mnt/sda1 ext4   defaults,x-gvfs-hide       0     2

Edit: Or you can create a fake line in /etc/fstab like this

/dev/sda2 /mnt/sda2 ext4 noauto,x-gvfs-hide 0 2

for the sole purpose of hiding it in nautilus. It will not be mounted so the mount point could not exist.

Solution 2:

This question deserves an update for Ubuntu 16.04 with user friendly steps.

What you see on the left side of Nautilus are your partitions. Mounted ones have the eject button beside them, unmounted ones do not. To mount the partition click on the name. Then you can navigate the folders and files.

You want to hide partitions so they don't appear in Nautilus.

Start Dash the first option on the Launcher

Type Disks and you will see the application Disks appear. Click on it.

A screen similar to this appears:

Open Disks

Left click on a Disk. Then left click on the Partition you want to hide.

Right click on the gear (follows the Left Arrow and -) and select Edit Mount Options and this screen appears:

enter image description here

Uncheck the option Show in User Interface.

Click OK and enter password to apply changes. After the next reboot Nautilus won't show the partition. Note that this doesn't erase the partition or delete any data on it.

If you need clarification please post a comment below.

Solution 3:

You can just add it to /etc/fstab (this will cause it to be mounted automatically at startup). If you specify a mount point outside /media you don't see it in Nautilus anymore.

For those who don't know how to do this here's an example:

If you had a logical volume /dev/sda2 of the filesystem-type ext3 that you want to mount to a directory Music, because it contains your Music, you have to add the following new line to /etc/fstab:

/dev/sda2 /mnt/Music ext3 defaults 0 0

For other filesystems or names you just edit this line. Then, you save the file, make the mount point with sudo mkdir /mnt/Music, or whatever you want to name the mount point. If you don't want to reboot to see the change, just once execute sudo mount -a.

Solution 4:

To avoid command line, you can open Applications > Disks.

Select the partition you want to hide, click on the gear icon ("additional partition option") > Edit Mount Options and unchecked "Show in user interface". Reboot, the partition is now hidden.

Tested on Ubuntu 16.04 LTS