当前位置:操作系统 > Unix/Linux >>

centos删除root目录误删主机名称提示:bash-4.1#解决办法

本人直接复制了3个文件搞定到/root/目录

/etc/skel/.bash_logout
/etc/skel/.bash_profile
/etc/skel/.bashrc

节约空间1G,删除垃圾势在必行

root目录误删主机名称提示是:bash-4.1#解决办法

1、mkdir /root 创建root目录cp -pr  /etc/skel/.* /root/

2、拷贝配置文件到root目录下

3、重启搞定

------------------

linux下shell显示-bash-4.1#不显示路径解决方法 

在linux shell中不显示路径了,显示为-bash-4.1#用起来很不方便。

如何改为显示路径的shell呢?

步骤如下:

vim ~/.bash_profile

(不用管.bash_profile这个文件有几个,自己新建一个也是可以的)

在最后加上
export PS1='[\u@\h \W]\$'

然后执行
source ~/.bash_profile

这样shell就可以显示路径了。
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,