ath*_*spk 89
我不确定那是不是你想要的,但是试试printenv
这将显示你所有的环境变量.
关于它们存储的位置
Linux:存储环境变量的位置在哪里?
如何设置Shell环境变量
http://www.codecoffee.com/tipsforlinux/articles/030.html
快乐阅读:-)
jok*_*net 62
只需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
Run Code Online (Sandbox Code Playgroud)
kar*_*lip 11
或者设置:
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.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
78920 次 |
最近记录: |