How to change the directory .wine of Wine to a different directory

I have Ubuntu installed on a rather small SSD. I want to be able to install Windows programs using Wine, but they have to be installed on the HDD. By default, Wine creates a folder in the home directory /home//.wine where the installed Windows programs are saved. I want to change this to another location, such as /media/HDD/.wine Is there any possibility to achieve this in a simple way?

18.7k 6 6 gold badges 58 58 silver badges 69 69 bronze badges asked Jan 23, 2015 at 11:44 Marcus Blank Marcus Blank 163 1 1 gold badge 1 1 silver badge 5 5 bronze badges You change it with the WINE_PREFIX variable Commented Dec 26, 2017 at 3:56 Commented Dec 26, 2017 at 3:57

2 Answers 2

I looked in the "configure Wine" window, but to change the C directory is greyed out:

enter image description here

Simple solution: a link

What simply works however is:

 ln -s /path/to/the_other_location/drive_c ~/.wine 

That should simply work (and it does on my system)