10

I did this in Windows 7. My Documents, Videos, Music and other personal folders are in D:\ because it is my media disk.

In case of a system failure, I will always have access to these files when I reinstall the OS. I just right click, i.e. "Videos" in my personal folder (in my case named "Tesla") and click "location" to set a new location for it, which is in D:\Tesla and in the case of Videos folder in D:\Tesla\Videos. I do that for every personal folder.

Now, I want to know if this is also possible in Ubuntu 11.10? I would like, when I open my Home folder and click i.e. Videos, to go to /media/Media/Tesla/Videos (which is where my D:\ disk is mounted), instead of the default /home/tesla/Videos.

Thanks in advance.


EDIT: I already set up NTFS automounting via the NTFS Configuration Tool.

1
  • I just installed Ubuntu 18.04. I'm looking for the same thing. I used to have 14.04 and didn't find a simple way to do it either. I liked the answer by @Prasad RD below, but Ubuntu Tweak is no longer maintained. I tried Gnome Tweak instead, but it doesn't seem to have this option.
    – Mig82
    Dec 29, 2019 at 22:50

2 Answers 2

13

This can be accomplished with symlinks. But first, you need to setup your system so that the D: partition is automounted every time you boot Ubuntu.

Run sudo blkid to see the UUID (Universally Unique Identifier) for all of your partitions. Then you will have to edit your fstab with this information.

fstab is a file located in /etc/ which determines which drives and partitions should be mounted every time the system starts. Before you do anything else, make a backup of the one you have:

sudo cp /etc/fstab /etc/fstab.backup

Then, edit fstab (with for example sudo nano or gksu gedit) and add this line:

UUID=<UUID of your D: partition> /media/Media ntfs defaults 0 0

Make sure that the mount location, /media/Media, exists before doing this, then reboot.

Now it's time to create symlinks. You will need to remove the personal folders first, as otherwise the symlinks will be placed inside them instead of replacing them. Make sure to backup any files you have there before running these commands:

rm -rf ~/Videos && ln -s /media/Media/Tesla/Videos ~/Videos

Repeat for all the folders you want to appear in your Home directory.

3
  • Yep, that's exactly what I wanted. Thanks a lot. It will help a lot with video editing, web development and everything else I do on both systems.
    – Tesla
    Mar 5, 2012 at 12:36
  • Happy to help. :)
    – bessman
    Mar 5, 2012 at 12:38
  • bessman, I'm using Ubuntu Studio 15.10 and I followed all the steps you wrote before and the only one thing I got is to mount the D: partition into the /media/ directory. The system is still using the standard personal folders into the original location (not into D: partition). What's wrong here?
    – Juan
    Nov 27, 2015 at 20:45
10

enter image description hereUbuntu tweak might be helpful (I've never tried it on 11.10 but it works on 10.10) there is a section for Default folder Locations in Ubuntu tweak and you can change the folders, But I think you may need to mount the partitions after each reboot for access files through Home folder :-)

4
  • Ubuntu Tweak is working on 11.10 over here. I don't know if it would cause problems if the directories specified here aren't mounted. I suppose this is done by autofs right now. If you encounter problems after booting or leaving the system for a while, it could be because of the automatic unmounting of the directories. In that case: cut and paste the right (/media/Media/Tesla/..) line from /etc/mtab to /etc/fstab.
    – xatr0z
    Mar 5, 2012 at 12:09
  • Or you can setup NTFS drives for automount on startup. Check out this tutorial. :)
    – user45315
    Mar 5, 2012 at 12:20
  • That tutorial is not entirely accurate for Ubuntu. It assumes that ntfs-3g is not installed per default, which it is in 11.10.
    – bessman
    Mar 5, 2012 at 12:26
  • Although as not as close to the solution as Carborundum's method, Ubuntu Tweak helped solving some other issues. Thanks a lot dude!
    – Tesla
    Mar 5, 2012 at 12:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .