安装好FreeBSD后的一些基础配置修改

Posted by 4Aiur on 04/06/2010 in BSD |

安装好FreeBSD后的一些基础配置修改

  • 配置alias
[root@FreeBSD ~]# alias
alias cp='cp -i'
alias grep='grep --color'
alias ll='ls -lG'
alias mv='mv -i'
alias rm='rm -i'
alias vi='vim'
[root@FreeBSD ~]# 
  • 安装sudo
    [root@FreeBSD ~]# cd /usr/ports/security/sudo
    [root@FreeBSD /usr/ports/security/sudo]# make
    [root@FreeBSD /usr/ports/security/sudo]# make install
    [root@FreeBSD /usr/ports/security/sudo]# make clean
  • 修改man的环境变量,使用less来查看手册
    FreeBSD
    -P pager  Specify which pager to use.  By default, man uses ``more -s''.
              This option overrides the PAGER environment variable.

Linux
-P pager
Specify which pager to use. This option overrides the MANPAGER environment
variable, which in turn overrides the PAGER variable. By default, man uses
/usr/bin/less -is.

[4aiur@FreeBSD ~]$ tail -1 /etc/profile
PAGER="less -is"; export PAGER

  • 更新locate数据库
    [4aiur@FreeBSD ~]$ sudo /etc/periodic/weekly/310.locate
    Password:
    Rebuilding locate database:
    # 让vim支持彩色
    [4aiur@FreeBSD ~]$ locate vimrc_example.vim
    /usr/local/share/vim/vim72/gvimrc_example.vim
    /usr/local/share/vim/vim72/vimrc_example.vim
    [4aiur@FreeBSD ~]$ cp -pf /usr/local/share/vim/vim72/vimrc_example.vim ~/.vim

Tags:

Copyright © 2010-2024 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.