This topic created in 2562 days ago, the information mentioned may be changed or developed.
两个问题:
问题一:
为什么我的是 192:~ name$
有的人显示为: name@192 ~
为什么会有两种格式
问题二:
hostname 怎么成了 192 ?
3 replies • 2019-11-21 11:40:19 +08:00
 |
|
192:~ name$
这里的 192 是机器的名字, ~ 代表 当前用户的根目录,name 代表当前用户名
|
 |
|
``` vi ~/.bash_porfile #最后加上 export PS1='[%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%} ${PWD/#$HOME/~}] ' source ~/.bash_profile ```
注意 zsh 是要修改~/.zshrc 文件
|
 |
|
改下 dns 就好了
|