84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我在實驗樓看到terminal的右方有時間顯示如下,請問是怎样做到.
似乎不是設定$PS1的.
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Bash
if [[ "$SHELL" == "/bin/bash" ]]; then # export PS1="\u@\H \l \w\n" export PS1="\[3[38;5;11m\]\u\[$(tput sgr0)\]\[3[38;5;15m\]@\h:\[$(tput sgr0)\]\[3[38;5;6m\][\w]\[$(tput sgr0)\]\[3[38;5;15m\] \[$(tput sgr0)\]\[3[38;5;2m\]\@\[$(tput sgr0)\]\[3[38;5;15m\]\n\[$(tput sgr0)\]" fi
Looked at the terminal in the laboratory building. . . Using zsh. The prompt parsing method is different from bash.
If you are using zsh, you can modify the theme configuration in ~/.zshrc. Put
~/.zshrc
ZSH_THEME="candy"
Just modify it to the theme you like. Many themes have time display. The built-in zsh theme can be found here.
Bash
Looked at the terminal in the laboratory building. . . Using zsh. The prompt parsing method is different from bash.
If you are using zsh, you can modify the theme configuration in
~/.zshrc
. PutJust modify it to the theme you like. Many themes have time display. The built-in zsh theme can be found here.