How do you change default drive where programs are saved to new location/drive?

How do you change default drive where programs are saved to new location/drive?

I am new to fedora, I have my OS on an SSD and currently have apps on there but would like to mount an already installed HHD and then jave all future downloads save there. Please Help!!

Do you just want downloads on there, or other user data?

2 Likes

Welcome to the forum. Please start with the “New Users! Start Here!” for guidance on how to post questions/discussion here.

If I understand your question you want to have downloaded files go to the HDD while your OS is on the SSD.
The easiest way I can suggest to do that would be to (assuming the HDD is already partitioned and formatted with an ext4 file system and that file system is where you want the downloads) simply mount the HDD either as your users home directory ("/home/yourusername") or your users Downloads directory ("/home/yourusername/Downloads")
If you want to mount it as your users home directory you can first mount the HDD (I will call it /dev/sdb1) at /mnt with the command “sudo mount /dev/sdb1 /mnt”.
Once mounted then copy the contents of /dev/yourusername to the HDD using rsync as “sudo rsync -arv /home/yourusername/ /mnt” which will preserve all ownership and permissions during the copy.
Now edit the /etc/fstab file to mount the HDD on /home/yourusername. You can do a man on “fstab” to see what is required there. Use sudo and your favorite text editor to do that. “sudo gedit /etc/fstab” will work for that if you want.
You can now do a reboot and when you log back in the HDD will contain all your home data and the Downloads directory will be the default location files are placed when downloaded.

If you don’t want all your home data on the HDD, but only the downloaded stuff then you would only need to do the edit of /etc/fstab above. The mount location would be /home/yourusername/Downloads and after the edit is saved you could do “sudo mount -a” to mount the HDD immediately, or do a reboot and it will be mounted automatically at your users “Downloads” directory to contain any future downloads.

I hope this is a help. Since you said you are new to fedora and your question indicated a novice I tried to give a guide of the steps without being too detailed in what needed to be done.

1 Like

Thanks alot, I was stuck on that issue for two weeks. I will give it a try. This linux stuff has a learning curve to it.

Alternatively, you can specify a custom download directory and restart Nautilus to apply changes:

nano ~/.config/user-dirs.dirs
pkill nautilus
  1. Does that also work for downloads using all browsers? I use Chrome and it defaults to wherever I last downloaded that session instead of always going to ~/Downloads. I have it set to ask before downloading instead of just blindly downloading wherever.
  2. The OP wanted to use his HDD for his downloads and it seemed he was unfamiliar with how or where to mount it to achieve that. My instructions were mostly about getting it mounted and usable for him.

Yes, linux has a learning curve, but then windows and any other OS has the same. Switching between them is what seems difficult because once you are familiar with one it seems uncomfortable to try and change habits.

I have never regretted abandoning windows and going the FOSS way with my OS. Lots cheaper and easier than paying out the nose regularly for software with the new paradigm of paying regularly for a subscription to a software package instead of the old way of paying for a user license once and done.

1 Like

I mean you can mount it anywhere and modify the download directory location.
It should be similar to symlinking and allows to relocate more than one directory.