Latest LQ Deal: Latest LQ Deals
Go Back > Blogs > des_a
User Name


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:

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 274 Comments 1
« Prev     Main     Next »
Total Comments 1


  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


All times are GMT -5. The time now is 05:01 PM.

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