Home·Terminal commands

arp

Networking

Usage

arp -a

Shows the table of MAC addresses for neighbours on the same local network; anything beyond the router is never in it, and on Linux `ip neigh` is the current tool.

Common flags

FlagMeaning
-aThe whole neighbour cache, name plus MAC address.
-nNumeric only, no name lookups.
-d <host>Delete one entry, which forces a fresh lookup.
-s <ip> <mac>Add a static entry by hand.

Examples

arp -a

The MAC addresses of machines on this network segment.

sudo arp -d 192.168.1.10

Clear a stale entry after a device changed hardware.

When a connection fails, these narrow down how far it got — name not resolving, no route, or a blocked port.

How to read this

  • Square brackets [ ] mark a part you may leave out.
  • An ellipsis … means you can list more than one.
  • Flags are case-sensitive — in some commands -r and -R do different things.

Questions

Q. What does arp do?

Shows the table of MAC addresses for neighbours on the same local network; anything beyond the router is never in it, and on Linux `ip neigh` is the current tool.

Q. How do I type it?

arp -a — square brackets mark the parts you can leave out.

Q. How many flags are worth knowing?

4 are listed here; the full set is in man arp. This command sits under Networking.

Related commands

man page: man arp