LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > des_a
User Name
Password

Notices


Rate this Entry

Setting Static IP on Raspberry Pi

Posted 08-08-2021 at 06:43 PM by des_a

I fought and fought with the Raspberry Pi, trying to set a static IP. I really wanted it to have a static reservation on the DHCP server, like everything else. But, there is [a bug???] in the software that won't get any DHCP address, if you set a static reservation for it.

So the answer to set a static IP? It turned out to be simpler than I thought, but it took me awhile to figure out. Assuming it is a IPv4 address, here is what you do.

Modify rc.local to add a line right before the return statement. It should be as follows:

Code:
ifconfig [adapter name] inet [ip address] netmask [netmask]
If I remembered the syntax right, that's it! Other things result in a network hang up where it will never get an IP, or worse, sometimes get a 169 IP.
Posted in Uncategorized
Views 691 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    I set my ip static using nm-tui. I have Network Manager installed.
    Posted 08-25-2021 at 05:41 AM by kermitdafrog8 kermitdafrog8 is offline
  2. Old Comment
    Sorry for the late reply. I just finished what should be my final degree for now. Now, in the inbetween time, I have time for some more home work. Not "homework", but "home work".
    Posted 06-22-2022 at 01:17 AM by des_a des_a is offline
 

  



All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration