set
declare
lists all set values, including functions but not aliases.
printenv
lists environmental (exported) variables.
Some Common Environmental variables
BASH_VERSION='4.3.30(1)-release'
COLUMNS=80 # number columns in display. This will change if you widen the
# window in Putty.
DISPLAY=localhost:10.0 # used for xterm (graphical)
EDITOR=vi # preferred editor if program has edit feature.
HISTFILE=/home/berezin/.bash_history # where history stored between sessions
HISTFILESIZE=500 # size of file
HISTSIZE=500 # number of commands to remember during current login.
HOME=/home/berezin
HOSTNAME=babbage
HOSTTYPE=x86_64
IFS=$' \t\n' # internal field separator - where to parse a line of data.
LANG=en_US.UTF-8
LINES=23 # number of rows on screen, changes with window size.
LOGNAME=berezin
MACHTYPE=x86_64-pc-linux-gnu
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PPID=12449 # parent process ID
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' # main prompt
PS2='> ' # 2ndary prompt - open quote
PWD=/home/berezin/ph/330 # current working directory
SHELL=/bin/bash
SSH_CONNECTION='108.66.52.131 49861 10.158.56.53 22' # 2 endpoints of network
connection.
SSH_TTY=/dev/pts/0 # terminal ID - tty should return same.
TERM=xterm #
UID=1001 # user ID
USER=berezin