Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Change shell variable on Linux mint

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-01-2011
Member
 
Join Date: Jan 2011
Posts: 42
Change shell variable on Linux mint
  

I am simply new user of Linux mint. I have some knowledge of environmental variables available on Linux. I want to know that is it possible to change the environmental variables in Linux surrounding. I only know that Linux operating system uses batch shell as its default environment. Is there any way? By means of which I can change its environmental variables. I ask many people about this, but I can?t get any desirable answer. If is there anybody? Who knows simple answer for It. Reply as soon as possible I keen to know that.

Reply With Quote
  #2  
Old 11-01-2011
Member
 
Join Date: Nov 2009
Posts: 787
Re: Change shell variable on Linux mint

Yes! You have right information about Default environment used by Linux. It is Bash shell. Environmental variables in bash shell help you in several ways. Certain Built-in variables change the shell in ways that make life little easier, and you can define other variables to suit your own purpose. To change the default Environmental variables I advise you to use Amazon mechanical Turk?s command line tool. Their instructions mentioned in their set-up guide say to do the two things mentioned below:-
Set the MTURK_CMD_HOME environment variable to point to your Command Line Tools installation location.

Set the JAVA_HOME environment variable to point to your Java Standard Edition Runtime Environment that is nothing but JRE installation location.
I hope this solution will work for you properly.
Reply With Quote
  #3  
Old 11-01-2011
Member
 
Join Date: Apr 2009
Posts: 967
Re: Change shell variable on Linux mint

After traversing, through many sites with the help of Google. Finally I come across the solution which will definitely solve your issue regarding changing the environmental variables available on Linux as default variables. You just need to write in your Linux console the following code which I am sure definitely works for you, for changing environmental variables.


Set the PATH environment variable to include the directory where you installed the Ant bin directory: export PATH=${ANT_HOME}/bin:${JAVA_HOME}/bin:${PATH}
Set the ANT_HOME environment variable to the directory where you installed Ant: export ANT_HOME=${ant_dir}
Set the ANT_OPTS environment variable to the directory where you installed Ant: export ANT_OPTS="-Xmx256M"
Set the JAVA_HOME environment variable to the directory where you installed the J2SE SDK application: export JAVA_HOME=${java_dir}
Set the JHHOME environment variable to the directory where you installed the JavaHelp application: export JHHOME=${javahelp_dir}
Set the CLASSPATH environment variable for DITA-OT: Set up your environment variable CLASSPATH to include the dost.jar.

For example:
Export CLASSPATH=${ditaot_dir}/lib:${ditaot_dir}/lib/dost.jar:${ditaot_dir}/lib/resolver.jar

Set the CLASSPATH environment variable for the Apache FOP application: Set up your environment variable CLASSPATH to include the fop.jar, batik.jar and avalon.jar files in the
FOP directory. For example:

Export CLASSPATH=${fop_dir}/build/fop.jar:${fop_dir}/lib/batik.jar:${fop_dir}/lib/avalon-framework-cvs-20020806.jar:${CLASSPATH}
Reply With Quote
  #4  
Old 11-01-2011
Member
 
Join Date: Nov 2009
Posts: 824
Re: Change shell variable on Linux mint

If you a programmer than I have yet another option for you. According to my concern except changing environmental variables available on bash shell I suggest you to create your own variables which will work for you as environmental variables. for creating your own variables in Linux environment first issue the command
Code=$HOME/projects/src/spew
And then, regardless of what directory you are using or in easy language say which directory you are currently using for entering the commands. Issue the following command

Cd $code

To pop over quickly to the directory which contains source code for that way-cool spew the programe you are developing for your information I like to tell you that you can use ?cd? command to change your directory.
A variable assignment like this will work, but its scope remains limited which up to current shell. If you launch another program or enter another shell, than that child task will not work with your created variables unless you export them. That?s why it is necessary to export variables at the time of creation and for exporting you just need to issue these commands.

export PS1="\u \$ "
export code=$HOME/projects/src/spew
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Change shell variable on Linux mint"
Thread Thread Starter Forum Replies Last Post
How can I run a GUI app from su shell in Linux Mint? Gopooo Operating Systems 6 18-11-2011 02:19 PM
Linux Mint: Am I missing something in Gnome Shell? Pulavarti Operating Systems 8 13-11-2011 12:11 AM
After the release of Linux Mint 12 with Gnome-Shell Ubuntu number one position is at risk Sanaka Operating Systems 10 12-11-2011 12:57 AM
Alternative for Linux Mint 12 and a Gnome Shell Souman Operating Systems 8 12-11-2011 12:56 AM


All times are GMT +5.5. The time now is 09:13 AM.