How to set path variables in Ubuntu?

Asked by ALDOUS

Hello,

        Im new to ubuntu and im not familiar with command shell execution,,,,Im lost! Seems linux doesn't create a user friendly settings for the path settings in environment variables like on windows. Even during partition im having a hard time with those lvm partitions, i even dont know whose partition is for primary and logical....its like really so vast that its necessarily to create a multiple partition dedicated to one os.
       Im currently using a triple boot systems xp,vista and now ubuntu and i had 2 hard drive 160gb with 3 partitions(xp=50+gb primary,vista=50+gb primary and media=50+gb logical) and the 80gb was dedicated to ubuntu. Initially im planning to make 40 - 40 gb partitions for the 2nd hard drive but during partitions im confused with the choices of partitions here the choice goes: manual, guided partitions which you drag to resize, and guided to format the entire drive.In short i install and reinstall over and over and came with a final choices which i supposed works for me now:
      Manual Partitions:

      I create a partitions dev2/sd1/ /boot 100mb primary
                                   dev2/sd2/ swap 2gb primary
                                   dev2/sd5/ / 13gb logical
                                   dev2/sd6/ /usr 11gb logical
                                   dev2/sd7/ /home 50gb logical
                                   dev2/sd8/ /data 4.9gb logical

    And i wish did i do it right?

    Then i installed ubuntu 8.04 then j2sdk6u14x64 bin using chmod to change permission. Then heres the question comes how to set the path in environment variables so i could install netbeans 6.5 IDE sh and run the java anywhere? I created a folder ProgramFiles to the home directory where java is saved. What should i do know? Thanks guys..Anyone! God Bless!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Larry Jordan (larryjor) said :
#1

   I believe it depends on what shell you are using; I am using bash and I think that's the default in Ubuntu if you didn't change it when you set yourself up a user account. (To check, go to System -> Administration -> Users and Groups; select your logon id and click Properties button. Under the Advanced tab, check to make sure your Shell says /bin/bash.)
   Assuming you ARE using Bash, the path is usually set in a "hidden" file such as .profile in your home directory. You can add to the path at any point by including something like PATH=$HOME/ProgramFiles/:$PATH as a separate line in the .profile file or the .bashrc file in your home directory; note that paths are separated by colons (:) and not semi-colons (;) like in Windows. In my experience in the past, the PATH variable should then be exported with a line like
     EXPORT PATH
but I don't see that in my $HOME/.profile path.

     Hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask ALDOUS for more information if necessary.

To post a message you must log in.