Results 1 to 4 of 4

Thread: Change shell variable on Linux mint

  1. #1
    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.

  2. #2
    Join Date
    Nov 2009
    Posts
    792

    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.

  3. #3
    Join Date
    Apr 2009
    Posts
    970

    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}

  4. #4
    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

Similar Threads

  1. How can I run a GUI app from su shell in Linux Mint?
    By Gopooo in forum Operating Systems
    Replies: 6
    Last Post: 18-11-2011, 02:19 PM
  2. Linux Mint: Am I missing something in Gnome Shell?
    By Pulavarti in forum Operating Systems
    Replies: 8
    Last Post: 13-11-2011, 12:11 AM
  3. Replies: 10
    Last Post: 12-11-2011, 12:57 AM
  4. Alternative for Linux Mint 12 and a Gnome Shell
    By Souman in forum Operating Systems
    Replies: 8
    Last Post: 12-11-2011, 12:56 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,031,545.37289 seconds with 17 queries