Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have windows 7 and ubuntu installed as dual boot. Till now i was working on Windows and have defined my user environmental variables. How can i import or use those defined in windows to ubuntu?

share|improve this question

migrated from Jul 13 '12 at 9:15

This question came from our site for professional and enthusiast programmers.

why do you want to do that? Maybe we can help better. Also I think this question should be better post in serverfault site instead of stackoverflow... – Oscar Foley Jun 13 '12 at 9:52
Do you really think I shouldn't post this in StackOVerFlow? My whole worspace is in windows and have many user defined variables. All I wanted is to convert the same into linux equivalent env variables which makes my work simpler and so that i can share the same with others and reduce their effort of redoing this? – user1453251 Jun 14 '12 at 14:37
In general if you choose correct StackExchange site for your question you will get better feedback. Anyway I have answered to it the best I knew :) – Oscar Foley Jun 14 '12 at 16:02

Why do you want to do this? If you explain why maybe there is a better option. It looks pretty complicated.

Anyway, assuming you need it, I think this might work:

  • You will have to create a disk unit that is mounted in both windows and linux by default.
  • You create then a text file containing variables you want to set up.
  • In windows boot you add a program (batch file, powershell) that somehow read these environment text file and loads variables
  • Do the same in linux with a a bash script in boot or similar.
share|improve this answer

You must log in to answer this question.