04-25-2016, 04:24 PM
(This post was last modified: 04-25-2016, 04:24 PM by lenny.raposo-pine64.pro.)
You can set it with
/etc/network/interfaces
and add this to the file (using 192.168.1.100 as the static in this example)
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 4.2.2.1 4.2.2.2 8.8.8.8
and to set hostname do this
echo myhostname > /etc/hostname
now edit /etc/hosts
and add an entry like so
127.0.0.1 localhost
192.168.1.100 myhostname
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
then reboot
/etc/network/interfaces
and add this to the file (using 192.168.1.100 as the static in this example)
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 4.2.2.1 4.2.2.2 8.8.8.8
and to set hostname do this
echo myhostname > /etc/hostname
now edit /etc/hosts
and add an entry like so
127.0.0.1 localhost
192.168.1.100 myhostname
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
then reboot
If you like my work be sure to check out my site or wish to donate to the cause
Cheers
Cheers