What are my environment variables? [closed]

I would like to find out my environment variables in bash. Are they stored somewhere?


Solution 1:

I am not sure if thats what you want, but try printenv
This will show you all your environment variables.

About where they are stored
Linux: where are environment variables stored?

How to set Shell Environment Variables
http://www.codecoffee.com/tipsforlinux/articles/030.html

Happy reading :-)

Solution 2:

Just execute env in a terminal.

Example output:

$ env
TERM=xterm
SHELL=/bin/bash
USER=joksnet
USERNAME=joksnet
DESKTOP_SESSION=gnome
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD=/home/joksnet
GDM_KEYBOARD_LAYOUT=us
LANG=en_US.utf8
HOME=/home/joksnet
DISPLAY=:0.0
COLORTERM=gnome-terminal
_=/usr/bin/env