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?

  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy