LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to change the environment variables? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-change-the-environment-variables-4175574739/)

novaglider 03-13-2016 07:22 AM

How to change the environment variables?
 
I am running out of space on my C disk because of running Ubuntu 15.10 alongside with Windows 10, therefore I basically can't install anything on Linux because I haven't got enough space. Luckily I have almost empty D disk and I would like to "move" everything there. By "move" I mean I want the programmes (OpenFOAM for example) to be installed and saved on my D disk. But in order to install the OpenFOAM I need enough space in the temporary folder.

So my idea is to change the path to something on the D disk (for example: D:/LINUX/temp). Since I am new to ubuntu I have absolutely no idea how to do that.

I did try this: How to change default /tmp to /home/user/tmp but... it doesn't really work the way i imagined it would.

Gary Baker 03-13-2016 07:38 AM

What is your complete setup Are you booting from grub.you are dual booting but how?

novaglider 03-13-2016 07:39 AM

Quote:

Originally Posted by Gary Baker (Post 5514635)
What is your complete setup Are you booting from grub.you are dual booting but how?

I am dual booting.

pan64 03-13-2016 09:16 AM

there are no c: d: and other drives in linux, so I do not really understand your post. Are those programs installed on windows (or linux?)
linux cannot eat up your windows' c drive.

Higgsboson 03-13-2016 09:25 AM

It sounds like you want your D:/ drive to hold all your Ubuntu programs only.
The D:/ drive will be in NTFS file format, but I don't think that should be a problem.
Can't you simply move the openfoam program folder to your D:/ drive? Then once in Ubuntu, you can mount the D:/ drive and run openfoam?

How big is your D:/ drive? Is it not possible to place Ubuntu and all its programs on the D:/ drive? Or does Ubuntu need to be on the C:/ drive in order to dual boot?

You could install Ubuntu live-USB with persistence and run Ubuntu and all its programs just from the USB. You will need to set your BIOS to boot from USB. This way you will gain all the space Ubuntu holds on your C:/ drive.

Alternatively, you could run Ubuntu live-USB without persistence, mount your C:/ drive and run openfoam taking care to save all your work onto the C:/ drive. This way you gain space from removing Ubuntu but not all the Ubuntu programs.

I don't use Windows so I haven't tried this myself.

novaglider 03-13-2016 09:29 AM

Quote:

Originally Posted by pan64 (Post 5514667)
there are no c: d: and other drives in linux, so I do not really understand your post. Are those programs installed on windows (or linux?)
linux cannot eat up your windows' c drive.

I have got two hard disk drives in my pc. In windows environment they are marked with "c:" and has approximately 50GB of space and another hard disk "d:" with more they 500GB of space.

At the moment I am dual booting Windows 10 and Ubuntu 15.10 which I just started using. Both operational systems are on my 50GB disk meaning this disk is basically full! And because the disk is full I can't even download a programme that is bigger than 500 MB. However the other disk has 400GB+ free space and my question here is: How to move all the downloads and temporary files (extracted files during the installation for example...) to this bigger hard disk drive.

I know linux doesn't have c: and d:. In my case those two hard disks are
Code:

mitja@mitja-N73SV:/media/mitja$ ls
066838686838589F  46D4AB97D4AB882F


novaglider 03-13-2016 09:34 AM

Quote:

Originally Posted by Higgsboson (Post 5514672)

How big is your D:/ drive? Is it not possible to place Ubuntu and all its programs on the D:/ drive? Or does Ubuntu need to be on the C:/ drive in order to dual boot?

You could install Ubuntu live-USB with persistence and run Ubuntu and all its programs just from the USB. You will need to set your BIOS to boot from USB. This way you will gain all the space Ubuntu holds on your C:/ drive.

I would LOVE to install the ubuntu on D:/ drive and have everything there! That would be a perfect solution. Yet during the installation I was only asked if I want to install ubuntu alongside Windows. I was never asked on which drive. - That is why I assume that Windows and Ubuntu have to be on the same disk. If that is not true, please let me know and I will do my best to place ubuntu ob D drive.

I tried with the USB thing - I wasn't satisfied with the speed of my computer. That is why switched to my hard disk drives.

pan64 03-13-2016 09:46 AM

you can install windows on one drive and linux on another, that should definitely work. The usual way is to install MS Windows first and leave an empty partition/disk for linux.
In your case probably you can reinstall ubuntu onto the new disk and simply remove it from the old one. Ubuntu will ask for the disk/partition, you need to specify that during the install.

vedearduff 03-13-2016 10:09 AM

How is your second (D drive) partitioned?

You could repartition the second drive. I would probably go with three partitions, one ntfs for windoze, and two for linux. I would mount the linux partitions as /home and /usr. If you decide to do this, the easy way would be to re install linux. If you simply create the partitions and mount them, the contents of your current /hom and /use directories will be inaccessible.

Higgsboson 03-13-2016 01:17 PM

Quote:

Originally Posted by novaglider (Post 5514679)
I would LOVE to install the ubuntu on D:/ drive and have everything there! That would be a perfect solution. Yet during the installation I was only asked if I want to install ubuntu alongside Windows. I was never asked on which drive. - That is why I assume that Windows and Ubuntu have to be on the same disk. If that is not true, please let me know and I will do my best to place ubuntu ob D drive.

You can dual boot with each OS on separate drives. However, your installation will need to be done from an Ubuntu OS so you have full ownership over your options.

Windows needs lots of disk space but linux distros don't. So you could install Windows on the 400gb disk and Ubuntu on the 50gb disk.
Are the disks hdd or ssd? If they're hdd, then the older hdd is going to die sooner. So the OS holding all your important personal files should go on the newer hdd.
Of course, this problem is removed if you create a separate data partition as a storage space for all your personal data. This partition should be on the newer hdd.

Quote:

I tried with the USB thing - I wasn't satisfied with the speed of my computer. That is why switched to my hard disk drives.
But a USB is an ssd. It's much faster than a hdd.
Speed is dependent on your CPU and how much RAM you have. How much RAM have got?

Remember, Windows 10 needs 20GB for its OS. Ubuntu will need less than 5GB for its OS. We can surmise from this that if Windows needs 4 times more space, maybe its doing 4 times more operations for each task. Essentially, Ubuntu should be faster.

I had an old 160GB hdd and a new 1TB hdd. So I put Windows in the 1TB and 4 linux distros in the 160GB hdd! Initially, I couldn't re-format the 160GB hdd because the partitioning software saw files on the hdd. But Windows wouldn't let me delete those files. I had no ownership of my hdd.
So I physically removed the hdd and Windows refused to work. After using a separate Windows recovery disk Windows started working again. I then used a linux live-usb and re-formatted the 160GB hdd from NTFS to ext4.
After that, Windows couldn't take control of the hdd and I was able to use it for linux distros.

Your 400GB drive is a lot of space. You can have Windows, Ubuntu and other distros, a data partition to backup personal data and even a swap partition to increase your RAM capability. To do this, you'll need to find out more about partitions.
To install different linux OSs on either drive, you can copy the relevant .iso file (i.e. OS installation file) onto your USB. Whichever partition the linux distro is going into, make sure the file format is ext4 (for example) and not NTFS. Windows cannot see ext4 file format - and this gives you privacy and security.


All times are GMT -5. The time now is 12:04 AM.