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. java性能优化总结

    本人在java中积累了一些性能优化相关的经验,现在总结如下: 批量处理服务性能优化 RTB服务性能优化 BasicData线上问题解决,疯狂FullGC的问题 BasicData线上部分服务器cpu使 ...

  2. 关于Bootstrap的入门知识

    问:Bootstrap是什么? 答:开源的前端框架,就是一些事先写好的css.js等. 问:Bootstrap在哪儿下载? 答:官方(https://getbootstrap.com/),中文(htt ...

  3. C#简繁体转换

    /// <summary>/// 字符串简体转繁体/// </summary>/// <param name="strSimple"></ ...

  4. 在cxGrid表格中如何获得当前列的字段名

    var GridDBTableView:TcxGridDBTableView; ColIndex:Integer; FieldName:string; begin GridDBTableView := ...

  5. Vue watch的高级用法

    <div> <p>FullName: {{fullName}}</p> <p>FirstName: <input type="text& ...

  6. c# devexpress 多文档界面

    学习记录 https://blog.csdn.net/qq_25473787/article/details/81208894?utm_source=blogxgwz0

  7. 二十、Flyweight 享元模式

    原理: 代码清单: BigChar public class BigChar { //字符名称 private char charname; //大型字符 # . \n 组成 private Stri ...

  8. day36 GIL锁与线程池

    多进程与多线程效率对比 # # """ # # 计算密集型 # """ # from threading import Thread # f ...

  9. 151. Reverse Words in a String翻转一句话中的单词

    [抄题]: Given an input string, reverse the string word by word. Example: Input: "the sky is blue& ...

  10. [leetcode]27. Remove Element删除元素

    Given an array nums and a value val, remove all instances of that value in-place and return the new ...