IFCONFIG(8)
๐ IFCONFIG โ configure a network interface (section 8 of the Linux System Administrator's Manual, bestie) ๐
okay so real talk, this is the ifconfig page from the Linux System Administrator's Manual, section 8, and honestly? it's a whole era. let's get into it โจ
โจ NAME โจ
ifconfig โ configure a network interface ๐ธ
โจ SYNOPSIS โจ
ifconfig [-v] [-a] [-s] [interface]
ifconfig [-v] interface [aftype] options | address ...
like. two whole shapes. pick your fighter ๐ซถ
โจ DESCRIPTION โจ
so ifconfig is the girl who configures the kernel-resident network interfaces. she's the one who shows up at boot time and sets up interfaces as needed โ that's her main character moment. after boot? she mostly only gets called when you're debugging or when the system needs some tuning. lowkey a "break glass in case of emergency" icon ๐
here's the vibe check on how she decides what to do:
- no arguments at all โ she displays the status of the currently active interfaces ๐
- one single interface argument โ she shows you the status of just that interface, no extras ๐
- a single
-aargument โ she shows you all interfaces, even the ones that are down (yes, the sleeping ones, she sees them) ๐ - anything else โ congrats, you're configuring an interface now, fr fr
๐ฆ Address Families ๐ฆ
if the first argument after the interface name is recognized as the name of a supported address family, then that address family is used for decoding and displaying all protocol addresses. she commits to the bit โจ
currently supported address families include:
inet(TCP/IP โ and this one is the default, no cap)inet6(IPv6)ax25(AMPR Packet Radio)ddp(Appletalk Phase 2)ipx(Novell IPX)netrom(AMPR Packet radio)
and here's a chaotic little detail โ all numbers supplied as parts in IPv4 dotted decimal notation may be decimal, octal, or hexadecimal, as specified in the ISO C standard. so, like:
- a leading
0xor0Ximplies hexadecimal - otherwise, a leading
'0'implies octal - otherwise, the number is interpreted as decimal
โ ๏ธ bestie, listen โ use of hexadecimal and octal numbers is not RFC-compliant and therefore its use is discouraged. i'm not saying don't, i'm saying don't ๐ญ
โจ OPTIONS โจ
all the flags, all the lore, let's go ๐
-aโ display all interfaces which are currently available, even if down ๐ she sees all.-sโ display a short list (likenetstat -i). snack-sized output ๐ง-vโ be more verbose for some error conditions. she'll tell you more when things go wrong ๐interfaceโ the name of the interface. this is usually a driver name followed by a unit number, for exampleeth0for the first Ethernet interface. if your kernel supports alias interfaces, you can specify them with syntax likeeth0:0for the first alias ofeth0โ you can use them to assign more addresses. to delete an alias interface useifconfig eth0:0 down. note: for every scope (i.e. same net with address/netmask combination) all aliases are deleted, if you delete the first (primary). yeah. the whole scope. gone. ๐upโ this flag causes the interface to be activated โญ it's implicitly specified if an address is assigned to the interface; you can suppress this behavior when using an alias interface by appending an-to the alias (e.g.eth0:0-). it's also suppressed when using the IPv40.0.0.0address, because the kernel will use this to implicitly delete alias interfaces. sneaky ๐ญdownโ this flag causes the driver for this interface to be shut down. nap time bestie ๐ด[-]arpโ enable or disable the use of the ARP protocol on this interface ๐ฆ[-]promiscโ enable or disable the promiscuous mode of the interface. if selected, all packets on the network will be received by the interface. she's nosy and thriving ๐[-]allmultiโ enable or disable all-multicast mode. if selected, all multicast packets on the network will be received by the interface ๐mtu Nโ this parameter sets the Maximum Transfer Unit (MTU) of an interface ๐ฅdstaddr addrโ set the remote IP address for a point-to-point link (such as PPP). this keyword is now obsolete; use thepointopointkeyword instead ๐netmask addrโ set the IP network mask for this interface. this value defaults to the usual class A, B or C network mask (as derived from the interface IP address), but it can be set to any value โจadd addr/prefixlenโ add an IPv6 address to an interface ๐ซถdel addr/prefixlenโ remove an IPv6 address from an interface ๐ซถtunnel ::aa.bb.cc.ddโ create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination ๐งโโ๏ธirq addrโ set the interrupt line used by this device. not all devices can dynamically change their IRQ setting โ so like, don't count on it ๐io_addr addrโ set the start address in I/O space for this device โกmem_start addrโ set the start address for shared memory used by this device. only a few devices need this ๐ธmedia typeโ set the physical port or medium type to be used by the device. not all devices can change this setting, and those that can vary in what values they support. typical values for type are10base2(thin Ethernet),10baseT(twisted-pair 10Mbps Ethernet),AUI(external transceiver) and so on. the special medium type ofautocan be used to tell the driver to auto-sense the media. again, not all drivers can do this ๐[-]broadcast [addr]โ if the address argument is given, set the protocol broadcast address for this interface. otherwise, set (or clear) theIFF_BROADCASTflag for the interface ๐[-]pointopoint [addr]โ this keyword enables the point-to-point mode of an interface, meaning that it is a direct link between two machines with nobody else listening on it ๐ (just the two of them. iconic.) if the address argument is also given, set the protocol address of the other side of the link, just like the obsoletedstaddrkeyword does. otherwise, set or clear theIFF_POINTOPOINTflag for the interface ๐hw class addressโ set the hardware address of this interface, if the device driver supports this operation. the keyword must be followed by the name of the hardware class and the printable ASCII equivalent of the hardware address. hardware classes currently supported includeether(Ethernet),ax25(AMPR AX.25),ARCnetandnetrom(AMPR NET/ROM) ๐ฅmulticastโ set the multicast flag on the interface. this should not normally be needed as the drivers set the flag correctly themselves ๐ (girlboss drivers, honestly)addressโ the IP address to be assigned to this interface โจtxqueuelen lengthโ set the length of the transmit queue of the device. it's useful to set this to small values for slower devices with a high latency (modem links, ISDN) to prevent fast bulk transfers from disturbing interactive traffic like telnet too much ๐ซถ (protect the telnet girlies)name newnameโ change the name of this interface to newname. the interface must be shut down first โ ๏ธ like, she has to be asleep for the rebrand, no cap.
โจ NOTES โจ
- since kernel release
2.2there are no explicit interface statistics for alias interfaces anymore. the statistics printed for the original address are shared with all alias addresses on the same device ๐ญ if you want per-address statistics you should add explicit accounting rules for the address using theiptables(8)command. - since net-tools
1.60-4ifconfigis printing byte counters and human readable counters with IEC 60027-2 units. so1 KiB=2^10byte. note, the numbers are truncated to one decimal (which can be quite a large error if you consider0.1 PiBis112.589.990.684.262bytes :) โ she said :) and meant it ๐ - interrupt problems with Ethernet device drivers fail with
EAGAIN(SIOCSIIFLAGS: Resource temporarily unavailable) โ it is most likely a interrupt conflict. seehttp://www.scyld.com/expert/irq-conflict.htmlfor more information โก
โจ FILES โจ
/proc/net/dev/proc/net/if_inet6
โจ BUGS โจ
ifconfiguses theioctlaccess method to get the full address information, which limits hardware addresses to 8 bytes ๐ because Infiniband hardware address has 20 bytes, only the first 8 bytes are displayed correctly. please use theip linkcommand from theiproute2package to display link layer informations including the hardware address ๐- while appletalk DDP and IPX addresses will be displayed they cannot be altered by this command ๐ค showing โ touching, apparently.
โจ SEE ALSO โจ
route(8), netstat(8), arp(8), rarp(8), iptables(8), ifup(8), interfaces(5)
http://physics.nist.gov/cuu/Units/binary.html โ Prefixes for binary multiples ๐ฆ
โจ AUTHORS โจ
the legends themselves ๐๐
- Fred N. van Kempen,
<waltje@uwalt.nl.mugnet.org> - Alan Cox,
<Alan.Cox@linux.org> - Phil Blundell,
<Philip.Blundell@pobox.com> - Andi Kleen
- Bernd Eckenfels,
<net-tools@lina.inka.de>
okay that's the whole page!! this one's from net-tools, dated 2008-10-03, and it's IFCONFIG(8) all day ๐ and the manual is titled IFCONFIG(8) with the Linux System Administrator's Manual energy, just so we're clear ๐
slay, go configure something, periodt โจ๐
๐ฆ where this page comes from
- alpine 3.22: net-tools-doc 2.10-r3 ยท GPL-2.0-or-later
- alpine 3.23: net-tools-doc 2.10-r3 ยท GPL-2.0-or-later
- alpine 3.24: net-tools-doc 2.10-r3 ยท GPL-2.0-or-later
- arch rolling: net-tools 2.10-3 ยท GPL2
- debian bookworm: net-tools 2.10-0.1+deb12u2 ยท GPL-2.0-or-later
- debian trixie: net-tools 2.10-1.3 ยท GPL-2.0-or-later
- nixpkgs unstable: net-tools 2.10
- opensuse-leap 16.0: net-tools-deprecated 2.10-160000.4.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: net-tools-deprecated 2.10-160000.4.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: net-tools-deprecated 2.10-160000.4.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: net-tools-deprecated 2.10-160000.4.1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms