1.配置使用者環境必備的三個重要檔案
1.bash_history
2.bash_logout
3 .bashrc
2.獲得上述三個必備檔案
1 cp /etc/skel/.bash_logout .2 cp /etc/skel/.bashrc .
注意:.bash_histrory在使用者進行終端操作時,可自動生成
3.載入配置內容
1 source .bashrc
4.終端中命名的含義
1\[email protected]\h:\w\$
2\u :使用者名稱
3\h :主機名
4 \w :目錄地址
5.修改使用者配置資訊的目錄地址
1 /etc/bash or /etc/bash.bashrc
6.新增環境變數
1#永久配置
2 vim ~/.profile #
配置僅但前使用者所使用的環境變數
3 vim /etc/profile #
配置所有使用者使用的環境變數
45 path=“path_added:$path” #
在檔案後面輸入
67 env #
檢視環境變數
8 source ~/.profile #
更新環境配置910
#臨時配置
11 export path=$path:/usr/local/php/bin