我的shell提示似乎已更改。我不确定造成该问题的原因。
现在如何显示:
bash-4.2$
我希望它如何出现:
robinhood@ubuntu$
提示由启动文件配置,/etc/profile
或每个用户在~/.profile
或~/.bashrc
。该文档说明了根据bash的调用方式使用了哪些文件。
Ubuntu Wiki包含带有默认和自定义提示的示例。您可能想将默认的Ubuntu提示符恢复到~/.bashrc
(假设已删除):
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
如果您不希望在提示符下使用当前工作目录,请删除\w
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句