PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\u@\h \t \[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]]\$"
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
本文介绍如何在Linux环境下定制PS1命令行提示符的颜色和格式。通过修改环境变量PS1,可以实现个性化显示用户名、主机名、当前时间和工作目录等信息,并采用不同颜色进行区分。
598

被折叠的 条评论
为什么被折叠?



