O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ifconfig

Synopsis

ifconfig [interface]
ifconfig [interface address_family parameters addresses]

TCP/IP command. Assign an address to a network interface and/or configure network interface parameters. ifconfig is typically used at boot time to define the network address of each interface on a machine. It may be used at a later time to redefine an interface’s address or other parameters. Without arguments, ifconfig displays the current configuration for a network interface. With the single option -a and no other arguments, it will display all current interfaces. Used with a single interface argument, ifconfig displays that particular interface’s current configuration. Note that interfaces are usually numbered starting at zero: eth0, eth1, eth2, and so forth. Wireless network interfaces may begin with ath0 or wlan0. On some systems the ifconfig command is deprecated in favor of the ip command.

Arguments

interface

String of the form name unit: for example, en0.

address_family

Since an interface may receive transmissions in differing protocols, each of which may require separate naming schemes, you can specify the address_family to change the interpretation of the remaining parameters. You may specify inet (for TCP/IP, the default), ax25 (AX.25 Packet Radio), ddp (Appletalk Phase 2), or ipx (Novell).

parameters

The following parameters may be set with ifconfig:

add address/prefixlength

Add an IPv6 address and prefix length.

address address

Assign the specified IP address to the interface.

allmulti/-allmulti ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required