在profile.d中添加custom.sh确垫,為所有用戶自定義PS1環(huán)境變量
以下兩種方式任選其一:
sudo bash -c "echo 'PS1=\"\$ \"'>>/etc/profile.d/custom.sh"
echo 'PS1=\$ ' | sudo tee -a /etc/profile.d/custom.sh
參考:
- 搜索引擎搜索
Linux prompt $ #
sudo echo >> 權(quán)限不夠 - 本地目錄查找
sudo grep PS1 /etc/ -R