LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2020, 10:33 PM   #1
darthgonzo
LQ Newbie
 
Registered: May 2020
Posts: 8

Rep: Reputation: Disabled
How do I make a mounted drive the primary storage location for downloads?


Hey folks!

So in a previous post, I mentioned how I was unable to boot my system past a frozen Linux Mint splash screen (also unable to login with my user credentials even if I made it that far) so after much frustration, I actually just gave up on troubleshooting and performed a fresh installation. I'm pretty sure this issue arose from the fact that I hadn't mounted or partitioned my HDD for storage so all of my downloads went straight to the local disk (sda1 120GB) and **spoiler alert** completely filled my disk space.

So now after a fresh installation (I'm running Linux Mint 19.3 Tricia - Cinnamon), I'm hoping to avoid cluttering up my disk space by directing all downloads to my 2TB HDD, which is already mounted and ready to go. So how can I make sure that when I download software or programs, from Software Manager for example, they will be downloaded to my hard drive instead of to the local disk?

If any additional system specs or terminal information is needed, let me know and I'll provide it in this thread.
 
Old 05-08-2020, 11:15 PM   #2
sxy
Member
 
Registered: Aug 2019
Posts: 43

Rep: Reputation: Disabled
1) Determine where the Software Manager stores its downloads, for example /var/cache.
2) Add an entry like
Code:
<your hdd>  /var/cache  <fs type>  defaults  0 0
to /etc/fstab. (For more info, see 'man fstab' and 'man mount'.)

(BTW, it surprised me that programs could eat up 120G disk space...)

EDIT: Sorry. I didn't notice you've already got your hdd mounted and maybe you don't want to change its mountpoint. Create a symbolic link should work.

For example, assuming download location is /var/cache,
Code:
mv /var/cache /var/cache.bak
mkdir -p <mountpoint of your hdd>/var/cache
ln -s <mountpoint of your hdd>/var/cache /var/cache

Last edited by sxy; 05-09-2020 at 12:07 AM.
 
1 members found this post helpful.
Old 05-09-2020, 12:38 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
It isn't worth directing system downloads to any particular place.
My root partition including /var and numerous cache files occupies less than 10GB.

It is worth directing multi-GB downloads such as ISO's, pictures, videos etc to a your empty disk.
 
Old 05-09-2020, 07:53 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,349
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
In Firefox, at least, you can go to Edit-->Preferences-->General-->Downloads, and designate a downloads directory.
 
3 members found this post helpful.
Old 05-10-2020, 05:09 AM   #5
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,505

Rep: Reputation: Disabled
You should find that your browser will allow you to change where they get stored, it is usually found under the Preferences menu. I always like it to 'ask me where' to put them, as I don't always want them in the same directory folder.
 
2 members found this post helpful.
Old 05-11-2020, 02:55 PM   #6
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,144

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
For user downloads I find the less per app customization I do, the better. I just mount my new drive and or create a folder dedicated to my user in a location with plenty of space, and replace the /home/"$USER"/Downloads with a symlink to that remote location. One and done.

Code:
ln -s /remote/download/folder /home/"$USER"/Downloads
In the case of package manager stuff, as far as Debian based stuff make a directory on your 2tb drive, hidden if you want and symlink to /var/cache/apt/archives. As long as it's got the right permissions the system will never know the difference. This would be my way of doing it, although as mentioned above if you maintain properly it should never really get that big. My upgrade scripts usually have an apt clean at the bottom of them, my squid http proxy keeps stuff cached on the lan for me.

Code:
mkdir -p /new/drive/.aptcache
# chown and chmod if needed
chown root:root /new/drive/.aptcache
chmod 755 /new/drive/.aptcache
# copy current archives downloads to new location
rsync -auv --progress /var/cache/apt/archives/* /new/drive/.aptcache/
# remove old folder
rm -r /var/cache/apt/archives
# link new target to old location
ln -s /new/drive/.aptcache /var/cache/apt/archives

Last edited by jmgibson1981; 05-11-2020 at 03:03 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Google I/O Android News: Location, Location, Location (Plus Cloud Messaging and Bluetooth) LXer Syndicated Linux News 0 06-05-2013 01:00 PM
Running Fedora 4 on primary master and cant acsess my xp files on primary slave roxberry1 Linux - Newbie 5 01-29-2006 11:37 AM
Dual boot primary Linspire & XP primary slave? watmonki Linspire/Freespire 5 11-01-2005 08:16 PM
location, location, location! mermxx LQ Suggestions & Feedback 9 09-25-2004 03:08 AM
boot loader, MBR, redhat9 on primary slave, winxp on primary master samik Linux - Hardware 4 10-15-2003 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration