You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
825 B

  1. # UPDATE: for newer systems better directly use:
  2. #
  3. # install dhcpcd: sudo apt-get install dhcpcd5
  4. #
  5. # vim /etc/dhcpcd.conf:
  6. #
  7. # interface eth0
  8. # static ip_address=192.168.1.150/24
  9. # static routers=192.168.1.1
  10. # static domain_name_servers=192.168.1.1
  11. #
  12. #
  13. # restart dhcpcd: sudo systemctl restart dhcpcd
  14. #
  15. # now reboot the rpi: sudo reboot
  16. # static ip configuration
  17. # /etc/netplan/50-cloud-init.yaml
  18. network:
  19. ethernets:
  20. eth0:
  21. dhcp4: true
  22. optional: true
  23. wifis:
  24. wlan0:
  25. dhcp4: no
  26. dhcp6: no
  27. addresses: [192.168.1.150/24]
  28. gateway4: 192.168.1.1
  29. nameservers:
  30. addresses: [1.1.1.1, 8.8.8.8]
  31. access-points:
  32. "wifiname":
  33. password: "password"
  34. version: 2