2019-02-26 03:12:43 +00:00
|
|
|
# export
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 命令为当前 shell 中的子进程进行环境变量设置。
|
2024-01-09 09:01:59 +00:00
|
|
|
> 更多信息:<https://manned.org/export.1posix>.
|
2019-02-26 03:12:43 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 设置为新的环境变量:
|
2019-02-26 03:12:43 +00:00
|
|
|
|
|
|
|
`export {{某变量名}}={{值}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 删除环境变量:
|
2019-02-26 03:12:43 +00:00
|
|
|
|
|
|
|
`export -n {{某变量名}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 给 PATH 追加新的路径进去:
|
2019-02-26 03:12:43 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
`export PATH=$PATH:{{追加的 path 路径}}`
|