您的位置:首页 > 其它

ubuntu 12.04 命令行不显示用户名和路径了

2014-02-26 08:50 190 查看

现象

Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.5.0-23-generic x86_64)

* Documentation:  https://help.ubuntu.com/ 
System information as of Wed Feb 26 16:31:31 CST 2014

Graph this data and manage this system at https://landscape.canonical.com/ 
Last login: Wed Feb 26 16:29:08 2014 from 10.0.17.139
$
$
$
$


分析和解决方案

一般的情况都认为是环境变量PS1的问题,可以手动设置下PS1环境变量。如:

export PS1=[`hostname`/`whoami`]$
如果情况未改变,请检查/etc/passwd的权限。

/etc/passwd的权限应该为644。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: