Editing Ifconfig

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
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.
  
Line 7: Line 6:
 
<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]] ==
+
== Configuring an alias IP ==
 +
=== Linux alias ===
 +
ifconfig eth0''':0''' 192.168.1.6 up
 +
 
 +
=== [[macOS]] [[alias]] ===
 +
Configure 3 alias in <code>en1</code> interface, https://ss64.com/osx/ifconfig.html:
 +
<pre>
 +
sudo ifconfig en1 inet 192.168.10.2/24 add
 +
sudo ifconfig en1 inet 192.168.20.2/24 add
 +
sudo ifconfig en1 inet 192.168.30.2/24 add
 +
</pre>
 +
or
 +
<pre>
 +
sudo ifconfig en1 inet 192.168.10.2/24 alias
 +
sudo ifconfig en1 inet 192.168.20.2/24 alias
 +
sudo ifconfig en1 inet 192.168.30.2/24 alias
 +
</pre>
 +
 
 +
 
 +
Remove/Delete alias:
 +
sudo ifconfig en1 inet 192.168.10.2/24 delete
  
 
== 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 interfaces in Linux]]:<ref>https://www.cyberciti.biz/faq/linux-list-network-cards-command/</ref>
+
* Show all network inferfaces in Linux:<ref>https://www.cyberciti.biz/faq/linux-list-network-cards-command/</ref>
 +
::<code>[[lspci]] | egrep -i --color 'network|ethernet'</code>
 +
::<code>[[lshw]] -class network</code>
 +
::<code>[[ifconfig -a]]</code>
 +
::<code>[[ip link]] show</code>
 +
::<code>ip a</code>
 +
::<code>cat [[/proc/]]net/dev</code>
 +
::<code>cat [[/proc/]]net//proc/net/fib_trie</code> (ips)
 +
::<code>systemd/networkctl|networkctl list</code>
 +
::<code>nmcli|nmcli device show</code>
 +
 
 
* 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 ==
+
== Related terms ==
* <code>[[ifconfig -v]]</code>
 
 
* <code>[[docker inspect]] CONTAINER_NAME | grep IPAddress</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 commands}}
 
* <code>[[ipconfig]]</code> Windows command
 
* <code>[[ipconfig]]</code> Windows command
 
* {{MacOS networking}}
 
* {{MacOS networking}}
 
* [[bonding]]
 
* [[bonding]]
 +
* [[Eth]]
  
 
== References ==
 
== References ==

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: