操作系统:freebsd 8.0-RELEASE
接触freebsd一天,感觉很不习惯 想把shell改为熟悉的bash
步骤
#cd /usr/ports/shells/bash
# make install clean ##这条命令忘记执行了 结果直接执行了下面的命令
#chsh -s /usr/local/bin/bash
于是杯具出现了 重新登录错误

su:/usr/local/bin/bash: no such file or directory
可见粗心大意 害人不浅
解决办法:
重启进入单用户模式 #启动时选择4
因为硬重启 所以开始先检测磁盘
#fsck
#mount -a
#chpass -s /bin/csh
重启正常登录 执行
# make install clean

#vim /etc/profile
在里面加入下面命令(这里根据自己情况修改 如果PS1变量正常 不需要改动)
PS1="`whoami`@`hostname | sed 's/\..*//'`"
case `id -u` in
       0) PS1="${PS1}# ";;
       *) PS1="${PS1}$ ";;
esac
注销重新登录即可
Tags: , ,
FreeBSD | 评论(0) | 引用(0) | 阅读(11720)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]