Monday, July 7, 2014

Examine the Linux Environment using printenv

If you wish to examine the environment variables, you can use the command printenv command

$ printenv | less

MODULE_VERSION_STACK=3.2.9
MANPATH=:/opt/xcat/share/man:
HOSTNAME=headnode.cluster.com
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=172.20.4.28 53794 22
SSH_TTY=/dev/pts/3
PERL_BADLANG=0
USER=me
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
LD_LIBRARY_PATH=......................................
XCATROOT=/opt/xcat
MODULE_VERSION=3.2.9
MAIL=/var/spool/mail/me
PATH=...........................
INPUTRC=/etc/inputrc
PWD=/home/me
LANG=en_US.UTF-8
MODULEPATH=/usr/local/Modules/contents
LOADEDMODULES=
MKL_HOME=/opt/intel/mkl/10.2.6.038
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SHLVL=1
HOME=/home/me

PBS_DEFAULT=headnode.cluster.com
LOGNAME=me
CVS_RSH=ssh
SSH_CONNECTION=xxx.xxx.xxx.xxx 22
MPI_HOME=/usr/local/mpi/intel
MODULESHOME=/usr/local/Modules/3.2.9
LESSOPEN=|/usr/bin/lesspipe.sh %s
AMBERHOME=/usr/local/amber10
G_BROKEN_FILENAMES=1
module=() {  eval `/usr/local/Modules/$MODULE_VERSION/bin/modulecmd bash $*`
}
_=/usr/bin/printenv

No comments: