Setting a static ip address on Raspberry Pi OS Lite (64-bit)

  • Author: Admin
  • Published On: 3/19/2026
  • Category: editor

Using dhcpcd.conf (recommended)

  • Open the config file
    
    sudo nano /etc/dhcpcd.conf
    
    
  • Scroll to the bottom and add something like:

    For Ethernet (wired)

    
    interface eth0
    static ip_address=192.168.1.50/24
    static routers=192.168.1.1
    static domain_name_servers=192.168.1.1 8.8.8.8
    
    

    For Wi-Fi

    
    interface wlan0
    static ip_address=192.168.1.50/24
    static routers=192.168.1.1
    static domain_name_servers=192.168.1.1 8.8.8.8
    
    
  • Restart networking (or reboot)
    
    sudo reboot
    
    
  • Share On: