-
- Using terminal go to /etc/network/interfaces.d directory.
- Create a file (e.g. ipv4) with the following content for IPv4:
auto eth0 iface eth0 inet static address <desired IP address for eth0> netmask <valid netmask> gateway <gateway address> #The following dns-nameservers field is optional #dns-nameservers <dns addresses delimited by space> auto wlan0 iface wlan0 inet static address <desired IP address for wlan0> netmask <valid netmask> gateway <gateway address> #The following dns-nameservers field is optional #dns-nameservers <dns addresses delimited by space>
Example
auto eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 8.8.8.8 8.8.4.4 auto wlan0 iface wlan0 inet static address 192.168.0.101 netmask 255.255.255.0 gateway 192.168.0.1
- Disable the DHCPCD service using the following command:
sudo systemctl disable dhcpcd.service
- Attach a LAN cable to your tinker board and run the following command:
sudo systemctl restart networking
Check your IP using the following command:
ip addr show
You might also want to disable the network manager using the following command if you don't need a desktop UI:
sudo systemctl disable NetworkManager
What do you name the file when you save it?
It could be anything but I’ve updated post for the sample file (e.g. ipv4).
I’d like to thank you for the efforts you have put in penning this site.
I am hoping to check out the same high-grade blog posts from you in the future as well.
In truth, your creative writing abilities has encouraged me to get my own, personal site now 😉