LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 855|回复: 6

blfs问题[已解决]

[复制链接]
发表于 2006-3-12 14:13:42 | 显示全部楼层 |阅读模式
安装前几个小程序后,屏幕左下角出现:

root@xxxx :/root@xxxx:~#

root@xxxx出现两次。看着很别扭。请帮忙。
发表于 2006-3-12 14:27:29 | 显示全部楼层
PS1设置问题,可能是配置文件里面PS1定义重复了.
用PS1='\u:\w\$ '恢复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-12 14:46:14 | 显示全部楼层
Post by youbest
PS1设置问题,可能是配置文件里面PS1定义重复了.
用PS1='\u:\w\$ '恢复


的确是PS 1问题。

PS1=‘\u:\w\$' 后变为:

root@xxxx :/root: ~#

相关设置在哪个文件里?

又及:有无可能把/root也隐藏掉?
回复 支持 反对

使用道具 举报

发表于 2006-3-12 19:05:49 | 显示全部楼层
PS1 的变量是

\t - time
\d - date
\n - newline
\s - Shell name
\W - The current working directory
\w - The full path of the current working directory.
\u - The user name
\h - Hostname
\# - The command number of this command.
\! - The history number of the current command

自己定义吧!
回复 支持 反对

使用道具 举报

发表于 2006-3-12 19:31:15 | 显示全部楼层
/etc/profile.d/extraprompt 里边的内容,去掉试试。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-12 20:13:28 | 显示全部楼层
Post by 终极幻想
/etc/profile.d/extraprompt 里边的内容,去掉试试。


解决了。谢谢!为什么?
回复 支持 反对

使用道具 举报

发表于 2006-3-12 20:38:23 | 显示全部楼层
不知道 LFS 为啥选择在 extra-prompt 和 配置文件中各自配置一次 PS1。。去掉一个就可以咯。呵呵。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表