make sure to run everything as root if you dont want to sudo on every command
# nano /etc/network/interfaces
and you will have something like this
assuming that your network is on eth0.# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
# The primary network interface
iface eth0 inet dhcp
change the line 'iface eth0 inet dhcp' to 'iface eth0 inet static'
and add
below so the lines would be likeaddress 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
and just restart your network by typing# The primary network interface
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
# /etc/init.d/networking restart
0 comments:
Post a Comment