if files seems readonly file:
sudo mount -o remount,rw /root_bypass_ramdisks
set configurations
sudo raspi-config
check DHCPCD status
sudo service dhcpcd status
enable and activate DHCPCD
sudo service dhcpcd start
sudo systemctl enable dhcpcd
from configure file
sudo nano /etc/dhcpcd.conf
set the following configurations for eth0
ethernet or wlan0
wifi interfaces
interface eth0
static ip_address=192.168.1.4/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
try ping to check the IP results
ping raspberrypi.local