A couple of years back I set up static IP in my Raspberry pi running Raspbian Stretch. Now I forgot and not able to find where I did that setup. I tried sudo nano /etc/dhcpcd.conf but it has only eth0 static IP. (see the dhcpcd.conf screenshot).



I can see my static IP in taskbar wifi info and I'm able to connect from PC using a remote desktop connection. Where will be the setting for this if it's not in dhcpcd.conf?

enter image description here

  • 2
    add an entry for interface wlan0 to /etc/dhcpcd.conf - that file can be changed if you want Mar 13 '20 at 8:11
  • Okay that I will try. I'm going to set Pi as an access point but still wondering where is the current setup.
    – smc
    Mar 13 '20 at 8:14
  • 2
    there's plenty of tutorials about setting a pi up as an access point - though, most of them are either OLD or rubbish Mar 13 '20 at 8:33
  • 2
    DO NOT post images - post text!
    – Milliways
    Mar 13 '20 at 8:52
  • "I set up static IP … I forgot and not able to find where I did that setup" Why did you set up static IP - how do you expect us to know how you did something silly?
    – Milliways
    Mar 13 '20 at 8:56

It is usually set by commands such as ifconfig:

ifconfig eth0 xxx.xxx.xxx.xxx netmask up

assuming it was actually in a file somewhere, lets say your ip is you may be able to find it using this command:

grep -r /etc

this will show you each file under the /etc hierarchy that has the string in it. if you really get desperate, maybe sudo grep -r / (the entire filesystem)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.