怎样將linux terminal 改成右邊有時間顯示
本文介绍了怎样將linux terminal 改成右邊有時間顯示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
我在實驗樓看到terminal的右方有時間顯示如下,請問是怎样做到.
似乎不是設定$PS1的.
解决方案
Bash的
if [[ "$SHELL" == "/bin/bash" ]]; then
# export PS1="\u@\H \l \w\n"
export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;2m\]\@\[$(tput sgr0)\]\[\033[38;5;15m\]\n\[$(tput sgr0)\]"
fi
这篇关于怎样將linux terminal 改成右邊有時間顯示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文