quick access to your environment variables

11 Jul, 2008  |  Posted by Danesh  |  in HowTo, Linux

Here’s a quick way to access your environment variables from the CLI.

User the “%” key in conjunction with your “<tab>” key to auto complete your environment variables.

pandora:/ # echo $J <TAB>
$JAVA_BINDIR  $JAVA_HOME    $JAVA_ROOT    $JDK_HOME     $JRE_HOME
pandora:/ # echo $JAVA_ <TAB>
$JAVA_BINDIR  $JAVA_HOME    $JAVA_ROOT
pandora:/ # echo $JAVA_HOME
/usr/lib/jvm/java

The traditional way is to “env | grep [variable name]

  • Digg
  • del.icio.us
  • BlinkList
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Furl
  • Google
  • Live
  • Facebook
  • Pownce
  • TwitThis
  • E-mail this story to a friend!
Tags: , , , , ,

No Responses so far | Have Your Say!

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>