1. ENV (environment abbreviation) and export Show all environment variables
2. Description of Environment variables
environment variable |
|
|
user home folder equivalent to "~" |
shell |
linux default to/bin/bash |
|
history record number of bars |
mail |
mail the directory in which messages are read (different per user):/var/spool/mail/root |
|
Execute file lookup path, between paths with: delimited, lookup in order in path |
|
language data Chinese: zh_cn.gb2312 and ZH_CN. UTF-8 |
random |
random number (between 0~32767) Generator is/dev/random |
3. Set view all variables (including environment variables and custom variables) in addition to the environment variables will also list other variables in bash
(1) Variable PS1
\u Current user Name
\h Current host Name
\ t Current time (24-hour format)
\w Current relative path
\$ "#" When the root role displays "$" for other roles
Description
Pictures and summary text from: Bird Brother's Linux private Dishes series basic Study (third edition) thanks bird Brother Take me on the road of Linux! I will have no scruples, go straight ahead!
Linux Learning Path: Shell variables (ii) Environment variables