Linux Networking Admin Cheat Sheet/Add IP address to interface

Assign an address to an interface.

Section: Interfaces Routing and Addresses

Add IP address to interface

bash
bash
sudo ip addr add 192.168.50.10/24 dev eth0
Explanation

Temporary until persisted through distro networking config.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Interfaces Routing and Addresses
Show brief interface summary
List interfaces with addresses concisely.
OpenIn sheetbashsame section
Show route used for destination
Display which route and source address would be used.
OpenIn sheetbashsame section
Bring interface up
Enable a network interface.
OpenIn sheetbashsame section
Add static route
Insert a route into the kernel routing table.
OpenIn sheetbashsame section
Show neighbor cache
Inspect ARP/ND neighbor entries.
OpenIn sheetbashsame section
Capture traffic on interface
Capture packets on a specific interface.
OpenIn sheetbash1 tag match