Setting a Static IP address in Kali Linux

Command Line Kali Linux Quickies

From the Kali desktop open a terminal window

Kali Linux Terminal

Now type the below command

gedit /etc/network/interfaces

Kali Linux Terminal with command

Add the below lines to the interfaces file after “iface lo inet loopback” and save it.

#The primary network interface
allow-hotplug  eth0
#iface eth0 inet eth0
Inface eth0 inet static
	address [your IP]
	netmask [your netmask]
        broadcast [use 192.255.255.255 for a 192 address]
        Gateway [your gateway]

interfaces file Kali Linux

Now back in the terminal window, input the below commands.

ifdown eth0
ifup eth0
ip a

Kail Terminal ip a

When you run the “ip a” command you should see your new IP settings.

 

Leave a Reply