(假定使用VirtualBox4.0.2)
1 在虚拟机硬盘所在目录下,运行如下命令将A盘复制到B盘:
...\.VirtualBox\HardDisks>vboxmanage clonehd A.vdi B.vdi
2 创建虚拟机B,并让其使用B盘。
Friday, 18 February 2011
Monday, 7 February 2011
Linux常用命令
测试网络的连通性:
[root@localhost ~]# ping -c 3 a.b.c.d
检查网络接口状态:
[root@localhost ~]# ifconfig -a
关闭网络接口eth0:
[root@localhost ~]# ifconfig eth0 down
打开网络接口eth0:
[root@localhost ~]# ifconfig eth0 up
为网络接口eth0设置网址:
[root@localhost ~]# ifconfig eth0 a.b.c.d netmask 255.255.255.0
查看内核路由表的配置:
[root@localhost ~]# route
添加默认网关:
[root@localhost ~]# route add default gw a.b.c.d
显示数据包所经过的路由:
[root@localhost ~]# traceroute a.b.c.d
显示网络端口状态:
[root@localhost ~]# netstat -penal
[root@localhost ~]# ping -c 3 a.b.c.d
检查网络接口状态:
[root@localhost ~]# ifconfig -a
关闭网络接口eth0:
[root@localhost ~]# ifconfig eth0 down
打开网络接口eth0:
[root@localhost ~]# ifconfig eth0 up
为网络接口eth0设置网址:
[root@localhost ~]# ifconfig eth0 a.b.c.d netmask 255.255.255.0
查看内核路由表的配置:
[root@localhost ~]# route
添加默认网关:
[root@localhost ~]# route add default gw a.b.c.d
显示数据包所经过的路由:
[root@localhost ~]# traceroute a.b.c.d
显示网络端口状态:
[root@localhost ~]# netstat -penal
Subscribe to:
Comments (Atom)