免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1487 | 回复: 0
打印 上一主题 下一主题

[FreeBSD] freebsd下设置linux环境 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-31 21:14 |只看该作者 |倒序浏览
用linux习惯了,用freebsd有点不习惯,freebsd中默认的是vi,不是vim,shell是cshell,而不是熟悉的bash,决定改一改。

先装cvsup
# cd /usr/ports/net/cvsup-without-gui
# make install clean

更新ports
# cp /usr/share/examples/cvsup/ports-supfile /root/ports-supfile
# vi /root/ports-supfile
把里面
default host=CHANGE_THIS.FreeBSD.org
改成
default host=cvsup3.cn.FreeBSD.org

# cvsup -g -L 2 /root/ports-supfile

-g 告诉 CVSup 不要使用 GUI。如果您 没在运行 X11 这个是自动的,否则您必须指定它。
-L 2 告诉 CVSup 输出所有正在升级的文件的细节。 有三个等级可以选择,从 -L 0 到 -L 2。默认是 0,意味着除了错误消息 什么都不输出。

安装自己熟悉的vim
# cd /usr/ports/ediotrs/vim
# make -DWITHOUT_X11 install clean
# cd /root
# vi .vimrc
set history=50          " keep 50 lines of command line history
set ruler               " show the cursor position all the time
set hls
set nocompatible
set bs=2
set sw=2
syntax on

# cp .vimrc /usr/share/skel/dot.vimrc

安装自已熟悉的shell
# cd /usr/ports/shells/bash2
# make install clean
# chsh -s /usr/local/bin/bash
# cd /root
# vi .bash_profile
alias vi='vim'

# cp .bash_profile /usr/share/skel/dot.bash_profile

加上我们熟悉的提示符
在/etc/profile中插入:
if [ "$BASH" ]; then
PS1='\u@\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi

参考文章:
http://www.cnfug.org/journal/archives/000057.html
http://www.uniorg.net/read.php?fid=31&tid=14194&toread=1
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP