Networking

Linux ip command

Inspect or configure network interfaces, addresses, and routes.

Availability: Common Linux commands; shell built-ins and external implementations may differ by distribution.中文

Syntax

ip [OPTIONS] OBJECT { COMMAND | help }

Examples

List interface addresses in a compact format.

ip -br address

Show the current routing table.

ip route

Parameters, options and clauses

Option / clauseDescription
-4 / -6Restrict the command to IPv4 or IPv6.
-br, -briefUse concise output for supported objects.
-s, -statsShow statistics where supported.
address (addr)Inspect or configure interface addresses.
linkInspect or configure network interfaces.
routeInspect or configure routing tables.
monitorWatch for network object changes.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory