LinuxCommandLibrary

ip-link

TLDR

Show all interfaces

$ ip link
copy
Show specific interface
$ ip link show eth0
copy
Bring interface up/down
$ sudo ip link set eth0 up
copy
Set alias name
$ sudo ip link set eth0 alias "LAN Interface"
copy
Change MAC address
$ sudo ip link set eth0 address ff:ff:ff:ff:ff:ff
copy
Set MTU size
$ sudo ip link set eth0 mtu 9000
copy
Set promiscuous mode
$ sudo ip link set eth0 promisc on
copy

SYNOPSIS

ip link [command] [OPTIONS]

DESCRIPTION

ip link manages network device configuration including bringing interfaces up/down, setting MAC addresses, MTU, and creating virtual interfaces like bridges, bonds, and VLANs.

PARAMETERS

show [device]

Display interface information
set device
Modify interface properties
add
Create a virtual interface
delete
Remove a virtual interface
up/down
Bring interface up or down
address mac
Set MAC address
mtu bytes
Set Maximum Transmission Unit
alias name
Set interface description
promisc on|off
Enable/disable promiscuous mode
master bridge
Assign interface to a bridge

CAVEATS

Changing MAC address usually requires interface to be down first. Virtual interfaces persist only until reboot unless configured in network configuration files.

HISTORY

ip link is part of iproute2, replacing the deprecated ifconfig command.

SEE ALSO

ip(8), ip-address(8), ethtool(8)

Copied to clipboard