下载PDF文件下载PDF文件
X
How.com.vn是一个“多人协作写作系统”,因此我们的很多文章都是由多位作者共同创作的。 为了创作这篇文章,志愿作者多次对文章进行了编辑和改进。
这篇文章已经被读过395,266次。
无论你运行的是何种版本的Linux或Unix,你都可以使用多种方法查看你的IP地址。这些方法包括了从简单的图形界面到复杂的查看网络信息的命令。
步骤
- 打开终端。你可以在程序列表中找到它,或者直接搜索“终端”。
- 输入命令: /sbin/ifconfig。终端中会显示大段网络信息。
- 如果出现错误信息,提示你缺少管理权限,请输入sudo /sbin/ifconfig 。
- 如果你使用的是Solaris系统或其他Unix版本,你需要输入/sbin/ifconfig -a来显示多个设备的信息。
- 如果出现信息,提示你命令失效,你可以参考上文在最新版本的Linux版本中输入终端命令 的说明。
- 在“inet adr”后面,找到列出的每个设备的IP地址。
- 如果信息太多,导致你无法找到IP地址,你可以输入/sbin/ifconfig | less减少显示的信息数量,或者输入/sbin/ifconfig | grep 'inet addr:'只显示IP地址。
- 如果你不确定你要找哪一个设备,那你要找到的设备很可能接入了端口“eth0”,也就是第一个可识别的本地连接。为了只显示“eth0”端口的信息,输入命令 /sbin/ifconfig eth0。
广告
小提示
这篇文章对你有帮助吗?
⚠️ Disclaimer:
Content from Wiki How 中文 language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.
- - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
- - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
- - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
- - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.
广告