Bash设置显示全部路径
https://zhidao.baidu.com/question/79488719.html
前面中括号显示当前的全部路径:
export PS1="[\`pwd\`]$"
1
效果:
或者
export PS1="[\u@\h \`pwd\`]$"
export PS1="[\u\`pwd\`]$"
export PS1="[\h\`pwd\`]$"
\u是用户名
\h是主机名
1
2
3
4
5
6
2
3
4
5
6
编辑 (opens new window)
上次更新: 2022/02/28, 15:05:00