Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I want to set my Slackware machine to have a static IP assigned from the router, how can I do so?

I assume I have to disable DHCP then edit something to set the requested IP, but I'm not sure where.

(I don't have a GUI)

share|improve this question
Could you be a little bit more clear? are you trying to set a static IP address(assigned by the node) or DHCP Reservation(which is does by the DHCP service)? your question suggests DHCP Reservation, but your "idea" suggest you are setting a static IP. –  llua Mar 12 '12 at 3:31
I'm trying to set a static local IP on the Linux machine, like Windows can do. –  Zeno Mar 12 '12 at 5:22

1 Answer 1

This heavily depends on whether or not your router supports it.

You do not need to disable DHCP, the DHCP reservations will need to be provided by your router and the router should have to set up a static standing reservation of the MAC address of the network interface to an IP address.

Of course you don't have to and you can disable DHCP and set up a static IP address altogether on the system by editing /etc/rc.inet1.conf. You can look at the documentation on possible settings here

share|improve this answer
I have a static local IP on a Windows7 machine under the route, I assume it's supported. This is done by doing a setting on the Win7 machine and not the router though. –  Zeno Mar 12 '12 at 5:18
@Zeno Yeah, that's one way to do it. The wrong way -- it technically works, but only because there aren't any other systems on your LAN and you're not generating collisions. Telling your router to assign a specific, static IP to the MAC address of your computer is the right way to do it. –  Shadur Mar 12 '12 at 9:08
@Shadur If Win7 is a DHCP Server that's the only way to do it and even if it's not it's not wrong if you configure DHCP ranges correctly. –  Karlson Mar 12 '12 at 12:32
@Zeno Take a look at the last paragraph of my answer and the link. –  Karlson Mar 12 '12 at 12:35
@Karlson What I think he means is that he's got one router and one actual desktop comp that dualboots windows and linux, and in windows he just assigns a static IP. –  Shadur Mar 12 '12 at 13:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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