修改ssh连上默认目录

vi /etc/passwd

ssh连接linux服务器只显示-bash-4.1#不显示路径时,我们只需要修改  ~/.bash_profile文件,如果不存在这个文件,那么新建一个,增加内容  export PS1='[\u@\h \W]\$’ 保存退出,最后执行,

source ~/.bash_profile

这时shell就可以显示路径了

猜你喜欢

转载自www.cnblogs.com/zephyr-1/p/11735915.html