2022-07-15 22:37:32 +08:00
|
|
|
# sysenv
|
2018-11-28 19:04:14 +08:00
|
|
|
|
2020-08-07 18:28:00 +08:00
|
|
|
[`sysenv`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-sysenv)
|
2020-07-21 20:34:41 +08:00
|
|
|
|
2022-07-15 22:37:32 +08:00
|
|
|
::: tip
|
|
|
|
查看当前 JVM 的环境属性(`System Environment Variables`)
|
|
|
|
:::
|
2018-11-28 19:04:14 +08:00
|
|
|
|
|
|
|
### 使用参考
|
|
|
|
|
|
|
|
```
|
|
|
|
USAGE:
|
|
|
|
sysenv [-h] [env-name]
|
|
|
|
|
|
|
|
SUMMARY:
|
|
|
|
Display the system env.
|
|
|
|
|
|
|
|
EXAMPLES:
|
|
|
|
sysenv
|
|
|
|
sysenv USER
|
|
|
|
|
|
|
|
WIKI:
|
2020-08-10 19:22:28 +08:00
|
|
|
https://arthas.aliyun.com/doc/sysenv
|
2018-11-28 19:04:14 +08:00
|
|
|
|
|
|
|
OPTIONS:
|
|
|
|
-h, --help this help
|
|
|
|
<env-name> env name
|
2022-07-15 22:37:32 +08:00
|
|
|
```
|
2018-11-28 19:04:14 +08:00
|
|
|
|
|
|
|
#### 查看所有环境变量
|
|
|
|
|
|
|
|
```
|
|
|
|
$ sysenv
|
|
|
|
KEY VALUE
|
|
|
|
----------------------------------------------------------------------------------------------------------------------------
|
|
|
|
PATH /Users/admin/.sdkman/candidates/visualvm/current/bin:/Users/admin/.sdkman/candidates/ja
|
|
|
|
va/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Wireshark.app/Contents/
|
|
|
|
MacOS
|
|
|
|
SDKMAN_VERSION 5.7.3+337
|
|
|
|
JAVA_HOME /Users/admin/.sdkman/candidates/java/current
|
|
|
|
JAVA_MAIN_CLASS_65244 demo.MathGame
|
|
|
|
TERM xterm-256color
|
|
|
|
LANG zh_CN.UTF-8
|
|
|
|
AUTOJUMP_SOURCED 1
|
|
|
|
COLORTERM truecolor
|
|
|
|
LOGNAME admin
|
|
|
|
XPC_SERVICE_NAME 0
|
|
|
|
PWD /Users/admin/code/ali/arthas/demo
|
|
|
|
TERM_PROGRAM_VERSION 3.2.5
|
|
|
|
_ /Users/admin/.sdkman/candidates/java/current/bin/java
|
|
|
|
SHELL /bin/bash
|
|
|
|
TERM_PROGRAM iTerm.app
|
|
|
|
SDKMAN_PLATFORM Darwin
|
|
|
|
USER admin
|
|
|
|
ITERM_PROFILE Default
|
|
|
|
TMPDIR /var/folders/0r/k561bkk917gg972stqclbz9h0000gn/T/
|
|
|
|
XPC_FLAGS 0x0
|
|
|
|
TERM_SESSION_ID w0t4p0:60BC264D-9649-42AC-A7E4-AF85B69F93F8
|
|
|
|
__CF_USER_TEXT_ENCODING 0x1F5:0x19:0x34
|
|
|
|
Apple_PubSub_Socket_Ren /private/tmp/com.apple.launchd.DwmmjSQsll/Render
|
|
|
|
der
|
|
|
|
COLORFGBG 7;0
|
|
|
|
HOME /Users/admin
|
|
|
|
SHLVL 1
|
|
|
|
AUTOJUMP_ERROR_PATH /Users/admin/Library/autojump/errors.log
|
|
|
|
```
|
|
|
|
|
|
|
|
#### 查看单个环境变量
|
|
|
|
|
2022-07-15 22:37:32 +08:00
|
|
|
::: tip
|
|
|
|
支持通过`TAB`键自动补全
|
|
|
|
:::
|
2018-11-28 19:04:14 +08:00
|
|
|
|
|
|
|
```
|
|
|
|
$ sysenv USER
|
|
|
|
USER=admin
|
|
|
|
```
|