1

I upgraded my laptop by changing my storage from HDD to SSD (switching from Windows 10 to Ubuntu right after) after I finished building my desktop. With that spare 2.5" HDD, I decided to remove the DVD player and replaced it with the HDD that was originally in my laptop (everything erased).

Now, I want to know how to move the Documents, Downloads, Pictures, etc. from SSD to HDD. I just want to use the SSD for games & other software

I just wish it was as easy as Windows (I just need to create folders on my HDD and have them redirect to their respective folders).

  • Is your HDD plugged into your computer and can you see it in the file manager? – Alex Lowe Jun 17 '16 at 23:10
  • See https://askubuntu.com/questions/223655/windows-ubuntu-dual-boot-share-files-between-os/223670?s=12|0.1407#223670 for something similar. Except in your case you can format the hdd as ext4, and not ntfs. – user68186 Jun 18 '16 at 13:01

1 Answers1

0

Assuming you HDD is well formatted and mounted in Ubuntu. In other words, you can access the HDD from a file manager (e.g. Nautilus). You can just create the required folders Documents, Downloads, Pictures, etc. on you HDD. And move your files to these new locations.

Next, there are some things you could do to make things a little more convenient.

For example, you could edit the ~/.config/user-dirs.dirs file. This file defines the links to the special Documents, Downloads, etc folders (these are shown in Nautilus on the left). The default content of this file looks like this:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

You can just edit this file to reflect the changes you made.

To resemble the original situation even more, you could add bind mounts to your /etc/fstab file. If you go this route, you don't need to change the ~/.config/user-dirs.dirs file. You would just bind mount for example the new location of the Documents folder (on your HDD), to the original location in your HOME folder. You could accomplish this by adding a line like this to your /etc/fstab:

/<mount-point-hdd>/Documents /home/<user-name>/Documents none rw,bind 0 0
Videonauth
  • 33,355
  • 17
  • 105
  • 120
bremme
  • 401
  • 4
  • 4
  • Any way I can change the permission of the fstab? It's read-only. – YamiYukiSenpai Jun 18 '16 at 06:07
  • By default fstab is not writable by a normal user, this is a good thing. You should not change its permission. You can edit fstab by becoming root. You can for example edit fstab by opening a terminal and typing sudo nano /etc/fstab. If you prefer a graphical editor, you could use gedit for example: sudo gedit /etc/fstab. Changing permissions is done using chmod and changing ownership by chown, but like I said: you should not change the permissions on fstab or system files in general. – bremme Jun 18 '16 at 11:10