Difference between revisions of "Ifconfig"
Tags: Mobile web edit, Mobile edit |
|||
(26 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{lc}} | ||
<code>[[wikipedia:ifconfig|ifconfig]]</code>is a command in Unix-like operating systems like Linux<ref>https://linux.die.net/man/8/ifconfig</ref>, [[FreeBSD]], [[OpenBSD]], [[macOS]] for [[Ethernet]] network interface configuration. | <code>[[wikipedia:ifconfig|ifconfig]]</code>is a command in Unix-like operating systems like Linux<ref>https://linux.die.net/man/8/ifconfig</ref>, [[FreeBSD]], [[OpenBSD]], [[macOS]] for [[Ethernet]] network interface configuration. | ||
− | In [[macOS]], the <code>ifconfig</code> command functions as a [[Wrapper pattern|wrapper]] to the IPConfiguration agent, and can control the [[BootP]] and DHCP clients from the command-line. Use of <code>ifconfig</code> to modify network settings in Mac OS X is discouraged, because <code>ifconfig</code> operates below the level of the system frameworks which help manage network configuration. To change network settings in Mac OS X from the command line, use <code>/usr/sbin/ipconfig</code> or <code>/usr/sbin/[[macOS/networksetup|networksetup]]</code>. | + | In [[macOS]], the <code>ifconfig</code> command functions as a [[Wrapper pattern|wrapper]] to the IPConfiguration agent, and can control the [[BootP]] and [[DHCP]] clients from the command-line. Use of <code>ifconfig</code> to modify network settings in Mac OS X is discouraged, because <code>ifconfig</code> operates below the level of the system frameworks which help manage network configuration. To change network settings in Mac OS X from the command line, use <code>/usr/sbin/ipconfig</code> or <code>/usr/sbin/[[macOS/networksetup|networksetup]]</code>. |
<code>ifconfig</code> command is included in the <code>[[net-tools]]</code> package but not installed by default in RHEL since version 7<ref>https://lwn.net/Articles/710533</ref>. | <code>ifconfig</code> command is included in the <code>[[net-tools]]</code> package but not installed by default in RHEL since version 7<ref>https://lwn.net/Articles/710533</ref>. | ||
− | == | + | == [[Configuring an alias IP]] == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Activities == | == Activities == | ||
− | * Show interface configuration in Linux including ip addresses: <code>ifconfig -a</code> or <code>ip a</code> | + | * Show interface configuration in Linux including ip addresses: <code>[[ifconfig -a]]</code> or <code>[[ip a]]</code> |
* Show interface Ethernet network capabilities of your interface, such as speed, with: <code>mii-tool -v YOUR_INTERFACE_NAME</code>, <code>mii-tool -v eth0</code> | * Show interface Ethernet network capabilities of your interface, such as speed, with: <code>mii-tool -v YOUR_INTERFACE_NAME</code>, <code>mii-tool -v eth0</code> | ||
− | * Show all network | + | * [[Show all network interfaces in Linux]]:<ref>https://www.cyberciti.biz/faq/linux-list-network-cards-command/</ref> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* Learn about [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming Linux Naming Schemes Hierarchy]. | * Learn about [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming Linux Naming Schemes Hierarchy]. | ||
* Change your [[MAC]] address: <code>ifconfig {eth0|wlan0} hw ether CA:CA:CA:CA:CA:CA</code> | * Change your [[MAC]] address: <code>ifconfig {eth0|wlan0} hw ether CA:CA:CA:CA:CA:CA</code> | ||
+ | * [[macOS]]: <code>[[ipconfig getifaddr]] en0</code> | ||
+ | |||
+ | == Related == | ||
+ | * <code>[[ifconfig -v]]</code> | ||
+ | * <code>[[docker inspect]] CONTAINER_NAME | grep IPAddress</code> | ||
+ | * Linux: <code>[[hostname -I]]</code>, <code>[[hostname -i]]</code> | ||
+ | anpi0 anpi1 anpi2 ap1 awdl0 bridge0 en0 en1 en2 en3 en4 en5 en6 gif0 llw0 lo0 stf0 utun0 utun1 utun2 utun3 | ||
== See also == | == See also == | ||
− | * {{Linux networking | + | * {{Linux networking}} |
* <code>[[ipconfig]]</code> Windows command | * <code>[[ipconfig]]</code> Windows command | ||
* {{MacOS networking}} | * {{MacOS networking}} |
Latest revision as of 12:11, 23 September 2022
ifconfig
is a command in Unix-like operating systems like Linux[1], FreeBSD, OpenBSD, macOS for Ethernet network interface configuration.
In macOS, the ifconfig
command functions as a wrapper to the IPConfiguration agent, and can control the BootP and DHCP clients from the command-line. Use of ifconfig
to modify network settings in Mac OS X is discouraged, because ifconfig
operates below the level of the system frameworks which help manage network configuration. To change network settings in Mac OS X from the command line, use /usr/sbin/ipconfig
or /usr/sbin/networksetup
.
ifconfig
command is included in the net-tools
package but not installed by default in RHEL since version 7[2].
Configuring an alias IP[edit]
Activities[edit]
- Show interface configuration in Linux including ip addresses:
ifconfig -a
orip a
- Show interface Ethernet network capabilities of your interface, such as speed, with:
mii-tool -v YOUR_INTERFACE_NAME
,mii-tool -v eth0
- Show all network interfaces in Linux:[3]
- Learn about Linux Naming Schemes Hierarchy.
- Change your MAC address:
ifconfig {eth0|wlan0} hw ether CA:CA:CA:CA:CA:CA
- macOS:
ipconfig getifaddr en0
Related[edit]
ifconfig -v
docker inspect CONTAINER_NAME | grep IPAddress
- Linux:
hostname -I
,hostname -i
anpi0 anpi1 anpi2 ap1 awdl0 bridge0 en0 en1 en2 en3 en4 en5 en6 gif0 llw0 lo0 stf0 utun0 utun1 utun2 utun3
See also[edit]
- Linux networking: Consistent Network Device Naming (eth, ens), DPDK, Alias IP, bonding, Wlan0,
ip
[link, route]
,ifconfig
netstat
ss
lsof
ping
ethtool
mii-tool
arping
nmcli
(RHEL)route
networkctl
,netplan
,tc
ipconfig
Windows command- macOS:
networksetup
,ifconfig
,ipconfig [ getifaddr ]
,scutil
- bonding
References[edit]
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.
Advertising: