Thursday, February 17, 2022

[SOLVED] Raspberry Pi no IP address?

Issue

I want to transfer some files from my Mac to my Raspberry Pi via SSH, but when I try to find the Raspberry Pi's IP address with the ifconfig command in the lx terminal, the line which everyone says tells you the IP address is not there!, it's just gone. My terminal looks like this:

      eth0      Link encap:Ethernet  HWaddr b8:27:eb:63:40:b8
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:27224 errors:0 dropped:0 overruns:0 frame:0
      TX packets:733 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:2801074 (2.6 MiB)  TX bytes:107019 (104.5 KiB)

      lo        Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Because this is not from my actual Raspberry Pi, please don't make deductions from it. It's just since I can't transfer files from the Raspberry Pi I can't get a copy of the actual text.

Sorry for the code mess up, it looks exactly like this website: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/finding-your-pis-ip-address

Except without line 2 in ethO.


Solution

You can add the IP address (until next reboot) with:

sudo ip addr add 192.168.0.100/32 dev eth0


Answered By - deagh
Answer Checked By - David Marino (WPSolving Volunteer)