vi /etc/passwdlinux
ssh链接linux服务器只显示-bash-4.1#不显示路径时,咱们只须要修改 ~/.bash_profile文件,若是不存在这个文件,那么新建一个,增长内容 export PS1='[\u@\h \W]\$’ 保存退出,最后执行,shell
source ~/.bash_profilebash
这时shell就能够显示路径了服务器