获取MAC中的IP地址
来源:互联网 发布:淘宝刷单兼职靠谱 编辑:程序博客网 时间:2024/05/16 10:22
Knowing your Mac’s IP address is important for setting up a network or sharing files, here’s two different ways to find your IP address in Mac OS X; an easy way through the GUI and a more technical approach with the command line. These methods will be the same whether you are connected via ethernet or wireless.
Find your IP Address on a Mac
You can find your IP address from the Mac System Preferences:
- From the Apple menu pull down “System Preferences”
- Click on the “Network” preference pane
- Your IP address will be visible to the right, as indicated in the screenshot below
Your IP address is the number listed, in the above case it is 192.168.0.100
Now we’ll cover the more technical approaches to getting your IP address using the Mac OS X command line:
Find your IP Address via the Mac OS X Terminal
This is how to find the IP address of your Mac through the Terminal, this is often the quickest way for those that are more technically inclined.
- Launch the Terminal located in /Applications/Utilities/
- Type the following command:
ifconfig |grep inet
- You will see something that looks like this:
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::fa1e:dfff:feea:d544%en1 prefixlen 64 scopeid 0x5
inet 192.168.0.100 netmask 0xffffff00 broadcast 192.168.0.255
- Your IP address is usually next to the last entry of ‘inet’ and in this case is 192.168.0.100, an IP address is always in the format of x.x.x.x but it will never be 127.0.0.1 because that is your machines loopback address. Because you can always ignore 127.0.0.1, this guarantees that your IP address will be the other IP between ‘inet’ and ‘netmask’
The other command line option is to use:ipconfig getifaddr en1
which reports back only your en1 (usually wireless) IP address. You can change this to en0 for wired/ethernet too. I have heard ipconfig is not supported in all versions of Mac OS X so I did not recommend this as the first choice. However, using ipconfig you can also set your IP address from the command line.
Find your External IP Address in Mac OS X
Your external IP address is what is broadcast to the world rather than your local network (behind a wireless router, for instance). This is easiest to find through a Terminal command a well:curl whatismyip.org
This will instantly report back your external IP address. We covered this command when finding your external IP address in the past.
- 获取MAC中的IP地址
- 获取ip、mac、地址
- 通过IP获取MAC地址
- 获取iP及Mac地址
- 通过IP地址获取MAC
- 获取IP/MAC地址方法
- 通过ip获取mac地址
- 显卡 mac ip地址获取
- 获取MAC地址和IP地址
- 根据Ip地址 获取 mac地址
- 通过IP地址获取MAC地址
- js获取mac地址及ip地址
- 获取指定IP地址的MAC地址
- asp.net获取IP地址mac地址
- 根据IP地址获取MAC地址
- java通过IP地址获取MAC地址
- 获取IP地址和MAC地址
- android获取Mac地址和IP地址
- PADS2007下怎么增加一个PCB DECAL封装----本人总结
- n!末尾含0的个数
- ZOJ Problem Set - 1016 parencodings
- ZTe v889d 双卡双待手机,不需要ROOT就使用卡2实现上网。(仅测试了安卓4.0版本)
- C#数据类型转换的几种形式
- 获取MAC中的IP地址
- URAL 1136 Parliament 二叉树水题 BST后序遍历建树
- UVA 539 The Settlers of Catan dfs找最长链
- JQ选项卡
- Jquery8_简单的动画效果
- ubuntu linux命令行下安装sublime text 2
- 19-textarea知识
- Beef up Web search applications with Lucene Improve searches with a more robust app from the Apach
- jAVA