User Tools

Site Tools


raspberry_pi:configuration

This is an old revision of the document!


Raspberry useful commands

Set static IP

Use nano (or any other text editor of your choice) to open the following file: Copy Code

  nano /etc/dhcpcd.conf 

Add the following lines to the bottom of the file. If such lines already exist and are not commented out, remove them.

Replace the comments in brackets in the box below with the correct information. Interface will be either wlan0 for Wi-Fi or eth0 for Ethernet.

 #interface [INTERFACE]
 #static_routers=[ROUTER IP]
 #static domain_name_servers=[DNS IP]
 #static ip_address=[STATIC IP ADDRESS YOU WANT]/24

RPI4

Open Network Manager UI with:

sudo nmtui
  • Choose “Edit connection”
  • Pick the connection you want to set to static, and select “Edit…” on the right.
  • Use the arrows on your keyboard to select the connection and the action button.

Set a password for root user

  #Set a password for root user:
  sudo passwd root

Allow root login

  #Allow root login
  sudo nano /etc/ssh/sshd_config
  #Authentication:  PermitRootLogin: yes
  #restart ssh service
  sudo service ssh restart

Useful commands

  #Gateway DNS
  route -n
  cat /etc/resolv.conf
      
  
  #Secure off
  sudo shutdown -h now
  
  #Memory
  free -m
  
  #disks
  lsblk -f
  
  #Version OS
  /cat/etc/osrelease
  
  #Temperature
  vcgencmd measure_temp
raspberry_pi/configuration.1738825097.txt.gz · Last modified: 2025/02/06 06:58 by jmbargallo