Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How would I assign an IP address usng ip (the Linux tool)? I've been doing it with ifconfig so far.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

ip addr add <IP address> dev <device name>

IP man page

share|improve this answer

From the ip man page:

ip addr { add | del } IFADDR dev STRING


ip addr add dev eth0
share|improve this answer
ip addr add a.b.c.d/mm brd + dev iface

brd + means asking iproute2 to automatically calculate the broadcast address based on the subnet information. E.g.:

ip addr add brd + dev eth0
share|improve this answer

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.