How to set static IP address?
To give static ip address graphically
1.Go to network connections
2.Then edit the connections in the wired settings
3.Add the ip address for the system
Here are the images below
If you are curious, You can find newly created connection from the above steps as configurations file at /etc/NetworkManager/system-connections
Edit /etc/network/interfaces
to reflect something like this:
# 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 # The primary network interface auto eth0 iface eth0 inet static address 192.168.0.X netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.X dns-nameservers 192.168.0.X
Then do a:
sudo /etc/init.d/networking restart
And that will get you fixed up.
OP posted:
Setting Static IP
sudo nano /etc/network/interfaces # I use vi instead of nano
When you open up the interfaces doc, you will see something like this:
auto lo eth0 iface lo inet loopback iface eth0 inet dynamic
You want to change it to incorporate the following:
auto lo eth0 iface lo inet loopback iface eth0 inet static address xxx.xxx.xxx.xxx (enter your ip here) netmask xxx.xxx.xxx.xxx (mine was 255.255.255.0) gateway xxx.xxx.xxx.xxx (enter gateway ip here,usually the address of the router)
Save your changes and exit.
Then I needed to add some dns info to
resolv.conf
so I opened up the file like so:sudo nano /etc/resolv.conf # I use vi instead of nano
Initially this file is empty excluding a warning of "Do not put anything in here it will be overwritten". I added the following information none the less.
This is the format:
nameserver xxx.xxx.xxx.xxx(enter your dns server ip) nameserver xxx.xxx.xxx.xxx(enter your alt dns server ip)
This is what I entered:
nameserver 8.8.8.8 nameserver 8.8.4.4
Save your changes and exit.
At this point you can either restart networking:
sudo /etc/init.d/networking restart
or reboot which is what I did:
sudo reboot
Once I was logged back in I tried the install again of
pure-ftpd
and all is good:apt-get install pure-ftpd
I hope this helps someone, I looked around for the fix and just happened upon it by accident.