第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 ~]$

 

至此问题解决。