UBuntu 系统下 按Ctrl+Alt+T 唤出终端

在终端输入: ifconfig 命令

点击回车 就可以看到自己电脑在局域网的IP地址了

图中第二行 inet 地址:192.168.1.101 就是你的电脑在局域网的IP地址了

如果输入 ifconfig 提示 找不到命令

那就在终端输入:sudo apt-get install net-tools 安装网络工具

安装完成后输入: sudo apt-get update 更新软件包

完成之后 再次输入 ifconfig 命令 就不会出现错误了

用Linux命令行获取本机外网IP地址

  

$ curl ifconfig.me

[root@localhost ~]# curl ifconfig.me

14.23.92.186

$ curl icanhazip.com

[root@localhost ~]# curl icanhazip.com

14.23.92.186

$ curl ident.me

[root@localhost ~]# curl ident.me

14.23.92.186

$ curl ipecho.net/plain

[root@localhost ~]# curl ipecho.net/plain

14.23.92.186

$ curl whatismyip.akamai.com

[root@localhost ~]# curl whatismyip.akamai.com

14.23.92.186

$ curl tnx.nl/ip

[root@localhost ~]# curl tnx.nl/ip

14.23.92.186

$ curl myip.dnsomatic.com

[root@localhost ~]# curl myip.dnsomatic.com

14.23.92.186

$ curl ip.appspot.com

[root@localhost ~]# curl ip.appspot.com

curl: (7) couldn't connect to host

$ curl -s checkip.dyndns.org | sed 's/.*IP Address: [0−9\.]∗[0−9\.]∗.*/\1/g'

[root@localhost ~]# curl -s checkip.dyndns.org | sed 's/.*IP Address: [0−9\.]∗[0−9\.]∗.*/\1/g'

14.23.92.186

Linux 查看IP的更多相关文章

  1. linux 查看ip地址

    1.先要打开linux服务器,然后在linux桌面的空白处点击右键 2.在弹出的选项里,点击[打开终端] 3.打开linux服务器的命令终端后,输入查询linux的ip地址的命令:ifconfig - ...

  2. linux -- 查看ip,路由,dns

    查看ip地址:ifconfig 查看gateway:route 查看dns:nm-tool

  3. Linux查看IP 网关 DNS

    ifconfig查看IP: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFC ...

  4. linux 查看ip、用户、时间对应执行的命令

    这个需要使用到history命令.可以加数字,返回最近执行的几条命令.如果不加数字会返回所有的历史命令. [root@localhost ~]# history 20 1015 rm stdin.lo ...

  5. linux查看IP

    1:输入 ifconfig,出现如下信息,找到eno16777736(网卡ip信息的配置文件名) 2:输入 cd /etc/sysconfig/network-scripts 找到网卡ip信息的配置文 ...

  6. linux查看出口ip 及w3m字符浏览器

    Linux 查看服务器出口IP    字符浏览器: http://wiki.ubuntu.org.cn/W3m

  7. Linux查看访问IP

    Linux查看访问IP https://blog.csdn.net/tojohnonly/article/details/82772323

  8. linux查看是否能访问外网及拥有的公网IP

    linux查看是否能访问外网及拥有的公网IP linux查看是否能访问外网及拥有的公网IP: 1,测访问外网能力:curl -l http://www.baidu.com 2,测访问外网能力:wget ...

  9. Linux & Windows 查看 ip 地址

    Windows 查看本机 IP 打开 cmd,输入 ipconfig,回车,找到IPv4地址 或者通过以下方式查看 点击Win10系统的右下角的宽带连接图标,如下图所示.        点击弹出菜单的 ...

随机推荐

  1. 工作流调度器azkaban

    为什么需要工作流调度系统 一个完整的数据分析系统通常都是由大量任务单元组成: shell脚本程序,java程序,mapreduce程序.hive脚本等 各任务单元之间存在时间先后及前后依赖关系 为了很 ...

  2. python Django 无法获取post 参数问题

    对于 request.POST.get(name) 方式取值,需要 from 表单提交数据,如果 是ajax 提交数据,则需要做如下设置: 1.设置请求头,以from表单方式传值 'Content-T ...

  3. 基于windows平台搭建elasticsearch

    部署准备 elasticsearch-6.0.1.zip--https://www.elastic.co/downloads/elasticsearch elasticsearch-head-mast ...

  4. MFC笔记7

    1.VS中显示行号 工具 -> 选项 -> 文本编辑器 -> C/C++ -> 行号 2.VS中调整字体大小 工具 -> 选项 -> 环境->字体和颜色 3. ...

  5. Django_Form验证(二),ajax验证

    还是一个简单的html提交页面,ajax提交就不需要form表单了: <p><input id="a" type="text" name=&q ...

  6. Java学习笔记(十六):this关键字

  7. 外网访问Vmware虚拟机中的某个服务(如http)

    如果主机是windowx NAT中隐藏的端口映射,说明一下环境,利用当然是VMnet8网络连接,在虚拟机中架设linux WEB服务器利用WEB默认80端口,IP为192.168.11.10,真实主机 ...

  8. 100-days: sixteen

    Title: The world's most expensive cities 生活成本最高的城市 For the first time in its 30-year history, the Wo ...

  9. Spring事务管理的四种方式(以银行转账为例)

    Spring事务管理的四种方式(以银行转账为例) 一.事务的作用 将若干的数据库操作作为一个整体控制,一起成功或一起失败.   原子性:指事务是一个不可分割的工作单位,事务中的操作要么都发生,要么都不 ...

  10. IOS Javascript Date的坑

    Date对象是JavaScript提供的日期和时间的操作接口,它有多种用法.手册上或者网上也有很多文章介绍,这里就不再次复述了. 上次遇到一个坑,这里总结下,也不是什么大问题,若是如果有经验,就不会花 ...