elo*_*one 4 shell defaults environment-variables
在$SHELL
UNIX 系统上首先设置的环境变量在哪里?
如何查找和打印我的终端的所有此类默认设置?
传统上,通过login(1):
ENVIRONMENT
login sets the following environment variables:
HOME The user's home directory, as specified by the password
database.
SHELL The user's shell, as specified by the password database.
Run Code Online (Sandbox Code Playgroud)
虽然现在它可能是一个窗口管理器或终端程序进行这些设置,这取决于 unix 的风格以及它们与传统的偏离程度。env
将显示当前在环境中设置的内容,shell 或其他内容可能已更改为默认设置。但是,“终端设置”通常不是环境变量,shell 喜欢bash
或zsh
具有set
命令,以及它们隐藏设置的其他地方......