bash 抓捕异常_linux 登录异常--bash-4.2$故障

第1章 显示故障为:

登录系统显示为: -bash-4.2$故障

第2章 如何解决:

故障原因:当前用户的环境变量文件丢失或者损坏、

解决方案:复制正确的文件到用户的家目录下,

用户家目录模板路径/etc/skel/

##复制变量到加家目录

-bash-4.2$ ll -a

total 20

drwxr-xr-x. 2 root root 4096 Nov 21  2014 .

drwxr-xr-x. 90 root root 4096 Jun 22 13:58 ..

-rw-r--r--. 1 root root   18 Sep 26  2014 .bash_logout

-rw-r--r--. 1 root root  193 Sep 26  2014 .bash_profile

-rw-r--r--. 1 root root  231 Sep 26  2014 .bashrc

-bash-4.2$ pwd

/etc/skel

-bash-4.2$ cp .bash* ~

-bash-4.2$ ls ~ -la

total 32

drwx------  4peng peng 4096 Jun 22 17:07 .

drwxr-xr-x. 3 root root 4096 Jun 21 21:37 ..

-rw-------  1peng peng   49 Jun 22 17:01 .bash_history

-rw-r--r--  1peng peng   18 Jun 22 17:07 .bash_logout

-rw-r--r--  1peng peng  193 Jun 22 17:07 .bash_profile

-rw-r--r--  1peng peng  231 Jun 22 17:07 .bashrc

drwxrwxr-x  3peng peng 4096 Jun 21 21:38 .cache

drwxrwxr-x  3peng peng 4096 Jun 21 21:38 .config

-bash-4.2$ logout

[root@mapeng-edu ~]# su - peng

Last login: Wed Jun 22 17:02:01 CST 2011 on pts/1

weicome to linuxedu.peng

[peng@mapeng-edu ~]$

至此问题解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值