How to Set Static IP Address on Kali Linux
Now i will show you how to do it on Kali Os.
Open terminal and type: leafpad /etc/network/interfaces
#Static IP
auto eth0
iface eth0 inet static
address 192.168.x.x (your ip you want to set)
netmask 255.255.255.0
gateway 192.168.x.x (your gateway)
Type "ifconfig" to check gateway
Restart network with this code:
/etc/init.d/network restart systemctl restart network
That you done!
For nameserver, add more:
dns-nameservers 4.4.4.4
dns-nameservers 8.8.8.8
Then edit file resolv.conf: leafpad /etc/resolv.conf
Your nameserver ip:
nameserver 8.8.8.8
nameserver 4.4.4.
Another method: Click on the settings icon, in Wi-Fi tab (With wire network, click on the Network tab). Click settings icon of the wifi you are connecting....
In IPv4 tab, Change Automatic to Manual, and type your ip like this:
Restart network:/etc/init.d/network restart
systemctl restart network
Good Luck!!