ifconfig -a
root@kali:~# ifup eth0
ifup: unknown interface eth0
vim /etc/network/interfaces
#自行添加网卡
auto eth0
iface eth0 inet dhcp
root@kali:~# ifup eth0
Internet Systems Consortium DHCP Client 4.3.
Copyright - Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/eth0/:0c::::b5
Sending on LPF/eth0/:0c::::b5
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port interval
DHCPDISCOVER on eth0 to 255.255.255.255 port interval
DHCPREQUEST of 10.104.23.2 on eth0 to 255.255.255.255 port
DHCPOFFER of 10.104.23.2 from 10.104.20.1
DHCPACK of 10.104.23.2 from 10.104.20.1
smbd.service is not active, cannot reload.
invoke-rc.d: initscript smbd, action "reload" failed.
bound to 10.104.23.2 -- renewal in seconds.