灌溉梦想,记录脚步

ubuntu 9.10 最新最快源

  Archive.ubuntu.com更新服务器(欧洲,此为官方源,电信网通用户使用):
  deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
  deb http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
  deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
  deb http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse
  deb http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
  deb-src http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
  deb-src http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse
  deb-src http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
  网易163更新服务器:
  deb http://mirrors.163.com/ubuntu/ karmic main restricted universe multiverse
  deb http://mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse
  deb http://mirrors.163.com/ubuntu/ karmic-updates main restricted universe multiverse
  deb http://mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse
  deb http://mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src http://mirrors.163.com/ubuntu/ karmic main restricted universe multiverse
  deb-src http://mirrors.163.com/ubuntu/ karmic-security main restricted universe multiverse
  deb-src http://mirrors.163.com/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src http://mirrors.163.com/ubuntu/ karmic-proposed main restricted universe multiverse
  deb-src http://mirrors.163.com/ubuntu/ karmic-backports main restricted universe multiverse
  sohu 更新服务器:
  deb http://mirrors.sohu.com/ubuntu/ karmic main restricted universe multiverse
  deb http://mirrors.sohu.com/ubuntu/ karmic-security main restricted universe multiverse
  deb http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted universe multiverse
  deb http://mirrors.sohu.com/ubuntu/ karmic-proposed main restricted universe multiverse
  deb http://mirrors.sohu.com/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src http://mirrors.sohu.com/ubuntu/ karmic main restricted universe multiverse
  deb-src http://mirrors.sohu.com/ubuntu/ karmic-security main restricted universe multiverse
  deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src http://mirrors.sohu.com/ubuntu/ karmic-proposed main restricted universe multiverse
  deb-src http://mirrors.sohu.com/ubuntu/ karmic-backports main restricted universe multiverse
  Mirrors.shlug.org更新服务器(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group):
  deb http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
  deb http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
  deb http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
  deb http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
  deb http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
  deb-src http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
  deb-src http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
  deb-src http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
  deb-src http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
  deb-src http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
  Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器):
  deb http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
  deb http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
  deb http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
  deb http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
  deb http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse
  deb-src http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
  deb-src http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
  deb-src http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
  deb-src http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
  deb-src http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse
  厦门大学更新服务器(教育网服务器):
  deb ftp://ubuntu.realss.cn/ubuntu/ karmic main restricted universe multiverse
  deb ftp://ubuntu.realss.cn/ubuntu/ karmic-backports restricted universe multiverse
  deb ftp://ubuntu.realss.cn/ubuntu/ karmic-proposed main restricted universe multiverse
  deb ftp://ubuntu.realss.cn/ubuntu/ karmic-security main restricted universe multiverse
  deb ftp://ubuntu.realss.cn/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic main restricted universe multiverse
  deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-proposed main restricted universe multiverse
  deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-security main restricted universe multiverse
  deb-src ftp://ubuntu.realss.cn/ubuntu/ karmic-updates main restricted universe multiverse
  成都市 电子科技大学更新服务器(教育网,推荐校园网和网通用户使用):
  deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic main multiverse restricted universe
  deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
  deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
  deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
  deb http://ubuntu.uestc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
  deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic main multiverse restricted universe
  deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
  deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
  deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
  deb-src http://ubuntu.uestc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
  == 如果无法解析uestc.edu.cn域名,请使用以下地址 ==
  deb http://ubuntu.dormforce.net/ubuntu/ karmic main multiverse restricted universe
  deb http://ubuntu.dormforce.net/ubuntu/ karmic-backports main multiverse restricted universe
  deb http://ubuntu.dormforce.net/ubuntu/ karmic-proposed main multiverse restricted universe
  deb http://ubuntu.dormforce.net/ubuntu/ karmic-security main multiverse restricted universe
  deb http://ubuntu.dormforce.net/ubuntu/ karmic-updates main multiverse restricted universe
  deb-src http://ubuntu.dormforce.net/ubuntu/ karmic main multiverse restricted universe
  deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-backports main multiverse restricted universe
  deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-proposed main multiverse restricted universe
  deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-security main multiverse restricted universe
  deb-src http://ubuntu.dormforce.net/ubuntu/ karmic-updates main multiverse restricted universe
  上海市上海交通大学更新服务器:
  deb http://ftp.sjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe
  deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
  deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
  deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
  deb http://ftp.sjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
  deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe
  deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
  deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
  deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
  deb-src http://ftp.sjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
  中国科学技术大学更新服务器:
  deb http://debian.ustc.edu.cn/ubuntu/ karmic main multiverse restricted universe
  deb http://debian.ustc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
  deb http://debian.ustc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
  deb http://debian.ustc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
  deb http://debian.ustc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
  deb-src http://debian.ustc.edu.cn/ubuntu/ karmic main multiverse restricted universe
  deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
  deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
  deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
  deb-src http://debian.ustc.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
  中国地质大学(北京)更新服务器:
  deb http://www.tofree.org/ubuntu/ karmic main restricted universe multiverse
  deb http://www.tofree.org/ubuntu/ karmic-security main restricted universe multiverse
  deb http://www.tofree.org/ubuntu/ karmic-updates main restricted universe multiverse
  deb http://www.tofree.org/ubuntu/ karmic-proposed main restricted universe multiverse
  deb http://www.tofree.org/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src http://www.tofree.org/ubuntu/ karmic main restricted universe multiverse
  deb-src http://www.tofree.org/ubuntu/ karmic-security main restricted universe multiverse
  deb-src http://www.tofree.org/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src http://www.tofree.org/ubuntu/ karmic-proposed main restricted universe multiverse
  deb-src http://www.tofree.org/ubuntu/ karmic-backports main restricted universe multiverse
  中国台湾 台湾大学更新服务器(推荐网通用户使用,电信PING平均响应速度41MS。强烈推荐此源,比较完整,较少出现同步问题):
  deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic main restricted universe multiverse
  deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic main restricted universe multiverse
  deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-updates main restricted universe multiverse
  deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-backports main restricted universe multiverse
  deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-security main restricted universe multiverse
  deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-security main restricted universe multiverse
  deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-proposed main multiverse restricted universe
  deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ karmic-proposed main restricted universe multiverse
  mirror.rootguide.org更新服务器(上海市 电信):
  deb http://mirror.rootguide.org/ubuntu/ karmic main restricted universe multiverse
  deb-src http://mirror.rootguide.org/ubuntu/ karmic main restricted universe multiverse
  deb http://mirror.rootguide.org/ubuntu/ karmic-updates main restricted universe multiverse
  deb-src http://mirror.rootguide.org/ubuntu/ karmic-updates main restricted universe multiverse
  deb http://mirror.rootguide.org/ubuntu/ karmic-backports main restricted universe multiverse
  deb-src http://mirror.rootguide.org/ubuntu/ karmic-backports main restricted universe multiverse
  deb http://mirror.rootguide.org/ubuntu/ karmic-security main restricted universe multiverse
  deb-src http://mirror.rootguide.org/ubuntu/ karmic-security main restricted universe multiverse
  deb http://mirror.rootguide.org/ubuntu/ karmic-proposed main multiverse restricted universe
  deb-src http://mirror.rootguide.org/ubuntu/ karmic-proposed main restricted universe multiverse
  台湾的官方源速度也相当不错,有时甚至快于内地的:
  deb http://tw.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
  deb http://tw.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
  deb http://tw.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
  deb http://tw.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
  deb http://tw.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
  deb-src http://tw.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
  deb-src http://tw.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
  deb-src http://tw.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
  deb-src http://tw.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
  deb-src http://tw.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
  以下源支持IPV6,推荐可以使用IPV6的教育网用户使用,速度在200kb/s左右,如需源代码,将deb替换成deb-src即可
  deb http://mirror.switch.ch/ftp/ubuntu/ karmic main multiverse restricted universe
  deb http://mirror.switch.ch/ftp/ubuntu/ karmic-backports main multiverse restricted universe
  deb http://mirror.switch.ch/ftp/ubuntu/ karmic-proposed main multiverse restricted universe
  deb http://mirror.switch.ch/ftp/ubuntu/ karmic-security main multiverse restricted universe
  deb http://mirror.switch.ch/ftp/ubuntu/ karmic-updates main multiverse restricted universe
  deb http://ftp.heanet.ie/mirrors/ubuntu/ karmic main multiverse restricted universe
  deb http://ftp.heanet.ie/mirrors/ubuntu/ karmic-backports main multiverse restricted universe
  deb http://ftp.heanet.ie/mirrors/ubuntu/ karmic-proposed main multiverse restricted universe
  deb http://ftp.heanet.ie/mirrors/ubuntu/ karmic-security main multiverse restricted universe
  deb http://ftp.heanet.ie/mirrors/ubuntu/ karmic-updates main multiverse restricted universe
  deb http://ftp.kddlabs.co.jp/020/Linux/packages/ubuntu/archive/ karmic main multiverse restricted universe
  deb http://ftp.kddlabs.co.jp/020/Linux/packages/ubuntu/archive/ karmic-backports main multiverse restricted universe
  deb http://ftp.kddlabs.co.jp/020/Linux/packages/ubuntu/archive/ karmic-proposed main multiverse restricted universe
  deb http://ftp.kddlabs.co.jp/020/Linux/packages/ubuntu/archive/ karmic-security main multiverse restricted universe
  deb http://ftp.kddlabs.co.jp/020/Linux/packages/ubuntu/archive/ karmic-updates main multiverse restricted universe

VI的一些基本用法

  1.*关于退出:*
  :wq! —-强制保存退出
  :wq —- 保存退出
  : x —– 作用和:wq 一样
  ZZ —- 作用和:wq一样,(注意Z是大写的,并且不是在命令模式)
  :q —- 退出
  :q! — 强制退出
  ========================================================
  2.*关于移动:*
  h : 在当前行向左移动一个字符
  j: 移动到下一行
  k:移动到上一行
  l:在当前行向右移动一个字符
  Ctrl +f: 向前滚动一页
  Ctrl +b:向后滚动一页
  :n 将光标定位到第n行
  : $ 将光标定位到最后一行
  0 将光标定位到本行的行首
  $ 将光标定位到本行的行尾
  G 将光标定位到本文章的最后一行,与: $功能相同。
  H 将光标定位到屏幕的顶端
  M 将光标定位到屏幕的中间
  L 将光标定位到屏幕的底端
  =============================================================
  3.*关于搜索:*
  /: 后面跟要查找的东西,在文件中向前搜索
  ?:后面跟要查找的东西,在文件中向后搜索
  n: 向前重复搜索
  N: 向后重复搜索
  =============================================================
  4.*关于复制*
  yy: 复制光标当前行
  nyy: 复制光标当前行到当前行以下的n-1行
  :1,100 co 200 将1~100的内容复制到第200行。
  :100,102 co $ 将100~102行的内容复制到最后一行。
  ==============================================================
  5.*关于粘贴:*
  p : 粘贴到当前行的下一行
  P(大) : 粘贴到当前行的 上一行
  ==============================================================
  6.*关于删除.剪切:*
  dd 删除当前行
  ndd 与nyy相似
  dw 删除一个单词
  ndw 与ndd相似
  x 删除一个字符
  nx 删除n个字符
  dG 删除当前光标到文件末尾的所有内容。
  d0 删除当前光标到本行行首的所有内容
  d$ 删除当前光标到本行行尾的所有内容
  :1,100d 删除1~100
  :100d 删除第100行
  :1,100 mo $ 将1~100行的内容移动到最后一行。
  ======================================================
  7.*关于插入:*
  i: 在当前位置的字符前面进入插入模式
  I: 在当前行的开头进行插入
  a: 在当前位置的字符后面进入插入模式
  A: 在当前行的结尾进行插入
  o: 在当前行下面打开一个新行进行插入
  O:在当前行上面打开一个新行进行插入
  ======================================================
  8.*关于撤销:*
  u: 撤销上一次的更改
  =======================================================
  9.*关于替换:
  r*egexp:是要匹配的式样
  replacement: 是要替换的字符串*
  *:s /regexp/replacement ————————-替换当前行出现的第一个式样
  :s/regexp/replacement/g————————-替换当前行所有的匹配
  :%s/regexp/replacement/g———————–替换文件中所有匹配式样
  ==========================================================
  *PS: 还有一个重要的命令就是"." 命令,这个命令是用来重复上一命令的*

dhcp的高级配置应用实例

[root@ zeyark]# more /etc/dhcpd.conf

# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample

ddns-update-style interim; # ddns-update-style (none|interim|ad-hoc):定义所支持的DNS动态更新类型,该参数 #必选且必须放在第一行且只能在全局配置中使用。
allow client-updates; #允许/忽略客户机更新DNS记录
option classless-static-routes code 121 = array of unsigned integer 8; #定义能根据option 121 (RFC 3442)下发路由
set vendor-string = option vendor-class-identifier; #使能在租约文件下看到设备标识(option 60)

shared-network DHCPnet { #定义广域共享的DHCP网络
subnet 192.168.1.0 netmask 255.255.255.0 {} #这个子网是你启用dhcpd服务网卡的IP地址所在的子网 例如,你服务器 上网 #卡配的IP地址为192.168.1.121 掩码24,192.168.1.0为这个子网的网络地址 #不配这个启动DHCP服务会有问题,会提示错误,不知 subnet 192.168.1.0 #netmask 255.255.255.0 {}这个网段,这个其实是你服务器网卡地址的网段 #划分子网(变长子网)请自行学习,这里不多讲。

option domain-name “zeyark.net”; #定义一个域名
option domain-name-servers 192.168.1.65 ; # 域名服务器的地址

default-lease-time 86400; #默认租约时间
max-lease-time 172800; #最大租约时间
subnet 172.20.0.0 netmask 255.255.255.0 { #定义多子网地址池这是其中的一个
option routers 172.20.0.1; #下发IP地址的时候的子网地址池网关
option subnet-mask 255.255.255.0; #地址池的子网掩码
option broadcast-address 172.20.0.255; #地址池的广播地址
option classless-static-routes 24,192,168,0, 172,20,0,1, #静态路由中的一种,option121,表示方法比较变态 28,59,52,114,96, 172,20,0,1, 29,59,52,114,120, 172,20,0,1; #其中24,192,168,0, 24是掩码,192,168,0,是网段
} #注意,这里都是逗号,不是点号。我说的变态就是说这个

subnet 172.11.0.0 netmask 255.255.255.0 { #定义另一个地址池
range 172.11.0.2 172.11.0.127;
option routers 172.11.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 172.11.0.255;
option classless-static-routes 24,192,168,0, 172,11,0,1,
28,59,52,114,96, 172,11,0,1, 29,59,52,114,120, 172,11,0,1;
}

subnet 172.21.0.0 netmask 255.255.255.0 { #定义另一个地址池
range 172.21.0.2 172.21.0.127;
option routers 172.21.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 172.21.0.255;
option classless-static-routes 24,192,168,0, 172,21,0,1,
28,59,52,114,96, 172,21,0,1, 29,59,52,114,120, 172,21,0,1;
}

subnet 172.16.11.0 netmask 255.255.255.0 { #定义另一个地址池
class “foo” {
match if substring (option vendor-class-identifier, 0, 31) = “H3C. H3C ICG2000,\”dslforum.org\”";
} #定义一个类,按设备标识下发IP地址,即传说中的option 60

pool { #定义一个池,允许设备属于class “foo”这个类的设备获取range #172.16.11.2 172.16.11.127;的地址
allow members of “foo”;
range 172.16.11.2 172.16.11.127;
}
pool { #定义一个池,禁止设备属于class “foo”这个类的设备获取range #172.16.11.128 172.16.11.254里的地址
deny members of “foo”;
range 172.16.11.128 172.16.11.254;
}

option routers 172.16.11.1;
option subnet-mask 255.255.255.0;
option broadcast-address 172.16.11.255;
option classless-static-routes 24,192,168,0, 172,16,11,1,
28,59,52,114,96, 172,16,11,1, 29,59,52,114,120, 172,16,11,1;

}

}

Ubuntu设置VirtualBox 桥接方式网络

  1、先安装含有建立虚拟网络设备 ( TAP interfaces ) 的工具 uml-utilities 和桥接工具 bridge-utils:
  sudo apt-get install uml-utilities
  sudo apt-get install bridge-utils
  为了使你的虚拟机能够访问网络接口,你必须将运行虚拟主机的用户的用户名(通常是你的ubuntu登录用户名)添加到uml-net用户组(请用你的用户名替换其中的“vboxuser”):
  sudo gpasswd -a vboxuser uml-net
  注意:为了使改动生效,请重新启动电脑。
  2、向你的 ubuntu 操作系统描述你要添加的虚拟网络设备,编辑 /etc/network/interfaces:
  sudo gedit /etc/network/interfaces
  在打开的文件后面添加下面的内容,将虚拟网络接口命名为 "tap0",指定该接口IP配置方法为手动,并指定使用该接口的用户(请用你的用户名替换其中的 "vboxuser"):
  auto tap0
  iface tap0 inet manual
  up ifconfig $IFACE 0.0.0.0 up
  down ifconfig $IFACE down
  tunctl_user vboxuser
  auto br0
  iface br0 inet dhcp
  bridge_ports all tap0
  或:
  auto br0
  iface br0 inet static
  address 192.168.1.57
  netmask 255.255.255.0
  gateway 192.168.1.1
  bridge_ports all tap0
  3、首次使用需要激活刚才建立的虚拟网络接口和网络桥:
  sudo /sbin/ifup tap0
  sudo /sbin/ifup br0
  这个步骤只需要做一次,下次主机重新启动时,这个接口和桥将自动激活。
  4、让 virtualbox 使用这个虚拟网络接口,启动 virtualbox,在主界面上选中要使用刚才建立的虚拟网络接口tap0的虚拟机,点“设置”,在弹出的窗口中选“网络”,选中其中一块网卡(通常为 “网络适配器 0”),选中“启用网络适配器”,“连接到”后面选 "Host Interface",选中“接入网线”,然后在“主机网络界面名称”中填入刚才建立的虚拟网络接口的名字 "tap0",确定。
  5、最后,配置主机和虚拟机的网络,使主机和虚拟机在同一个网段,这样主机和虚拟机就成了局域网中地位相同的两台机器了,可以互相访问了。

linux下制作和使用ISO文件

  Linux下制作iso的方法:
  直接从光盘做成iso可以用下面命令:
  dd if=/dev/cdrom of=~/cd.iso
  cat /dev/cdrom >;~/cd.iso
  cp -r /dev/cdrom cd.iso
  还可以使用复杂一些的 genisoimage 命令,可以提供强大的制作ISO的功能,如将本地文件夹做成ISO等。
  在Linux下使用ISO就更方便了,直接mount就可以了:
  mount -t iso9660 -o loop cd.iso /path

修复ubuntu的grub

  当windows的启动引导程序或者其他程序替换了linux的grub时,可以用下面方法修复:
  1、用一张linux的livecd启动系统,打开终端。
  2、进入grub的命令行:$ sudo grub
  3、修改启动表:hd0表示第一块硬盘,6是包含"/boot/grub/"的分区号,可以挨个试。
  > root (hd0,6)
  > setup (hd0)
  > quit
  4、重启。

linux下用批量改名命令的写法

  问题描述:在一个目录下,有一堆文件,例如 afile.txt bpage.htm csome.jpg …. 想批量进行改名,都统一改为: name1.file name2.file name3.file …
  解决办法:
  $ ls | grep -n '' | sed 's/\([0-9]*\):\(.*\)/\2 name\1.file/g' | xargs -n 2 mv
  用 ls | grep -n '' 可以对文件加上行号,输出结果为:
  1:afile.txt
  2:bpage.htm
  …
  然后通过 sed 进行模式匹配、替换操作,
  最后通过 xargs 构造出 mv 的参数。