Difference between revisions of "Ifconfig"
(Created page with "<code>ifconfig</code>is a command in Unix-like operating systems like Linux<ref>https://linux.die.net/man/8/ifconfig</ref>, FreeBSD, OpenBSD, macOS...") |
|||
Line 1: | Line 1: | ||
− | <code>[[ | + | <code>[[wikipedia:ifconfig|ifconfig]]</code>is a command in Unix-like operating systems like Linux<ref>https://linux.die.net/man/8/ifconfig</ref>, [[BSD|FreeBSD]], OpenBSD, [[macOS]] for Ethernet network interface configuration. |
Revision as of 07:11, 12 December 2019
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].
Contents
macOS alias
Configure 3 alias in en1
interface, https://ss64.com/osx/ifconfig.html:
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
or
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
Activities
- 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 inferfaces in Linux:[3]
lspci | egrep -i --color 'network|ethernet'
lshw -class network
ifconfig -a
ip link show
ip a
cat /proc/net/dev
systemd/networkctl|networkctl list
nmcli|nmcli device show
- Learn about Linux Naming Schemes Hierarchy.
See also
netstat
ipconfig
Windows command- networksetup (command) (macOS)
References
Advertising: