本机为debian 8(jessie)方法同样使用于其他linux 系统
查看mac和IP地址
方法一
打开terminal输入命令:
sudo ifconfig
eth0 后的 HWaddr xx:xx:xx:xx:xx:xx 即为网卡的mac地址
inet addr 192.168.xxx.xxx 即为IP地址
virbr0 后的HWaddr和inet addr 分别为虚拟机的网卡的mac地址和IP地址
e.g:
[thinkit@debian-xxx:]~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr 64:00:6a:52:55:xx
inet addr:192.168.xxx.xxx Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::6600:6aff:fe52:55xx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:864503 errors:0 dropped:0 overruns:0 frame:0
TX packets:80200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:143892918 (137.2 MiB) TX bytes:12999321 (12.3 MiB)
Interrupt:20 Memory:f7d00000-f7d20000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:555473 errors:0 dropped:0 overruns:0 frame:0
TX packets:555473 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:427343005 (407.5 MiB) TX bytes:427343005 (407.5 MiB)
virbr0 Link encap:Ethernet HWaddr fe:54:00:e3:d9:xx
inet addr:192.168.122.xx Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::fc54:ff:fee3:d9e7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35182 errors:0 dropped:0 overruns:0 frame:0
TX packets:33432 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5360677 (5.1 MiB) TX bytes:30371997 (28.9 MiB)
vnet0 Link encap:Ethernet HWaddr fe:54:00:e3:d9:xx
inet6 addr: fe80::fc54:ff:fee3:d9xx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1