Skip to content

Commit d75ae84

Browse files
committed
2017-06-22
1 parent 34b0479 commit d75ae84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Shell.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
- 如果脚本是用于 Crontab 定时任务,则定义在 /etc/profile 中的环境变量是无法使用的,需要重新定义。
2222

2323

24+
## 变量
25+
26+
- 查看系统的环境变量列表:`env``set`
27+
- 用户环境变量设置位置:`vim ~/.bash_profile`
28+
- 全局环境变量:`vim /etc/profile`
29+
- 环境变量要设置为全大写
30+
- 环境变量需要 export 导出,完整设置,比如下面设置 JDK:
31+
32+
```
33+
JAVA_HOME=/usr/program/jdk1.8.0_121
34+
export JAVA_HOME
35+
```
2436

2537

2638

0 commit comments

Comments
 (0)