我的环境variables是什么?

我想在bash中找出我的环境variables。 他们存储在什么地方?

我不知道如果那是你想要的,但尝试printenv
这会显示你所有的环境variables。

关于他们存储的地方
Linux:环境variables存储在哪里?

如何设置Shell环境variables
http://www.codecoffee.com/tipsforlinux/articles/030.html

快乐阅读:-)

只要在terminal执行env

示例输出:

 $ 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 

或者设置

 SET(P) POSIX Programmer's Manual SET(P) NAME set - set or unset options and positional parameters SYNOPSIS set [-abCefmnuvx][-h][-o option][argument...] set [+abCefmnuvx][+h][+o option][argument...] set -- [argument...] set -o set +o DESCRIPTION If no options or arguments are specified, set shall write the names and values of all shell variables in the collation sequence of the current locale. Each name shall start on a separate line, using the format: "%s=%s\n", <name>, <value> The value string shall be written with appropriate quoting; see the description of shell quoting in Quoting . The output shall be suitable for reinput to the shell, setting or resetting, as far as possible, the variables that are currently set; read-only variables cannot be reset. 

input不带任何参数的输出。