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. ABAP-FTP-配置

    1.FTP配置: 设置FTP参数:IP地址.账号.密码.路径.RFC目标. 设置数据表:数据表及字段明细,设置查询字段及报表输出字段. 2.操作界面 3.程序 ZFID0003_ETL_FTP 主程序 ...

  2. DJango 基础 (5)

    模板加载静态文件 在settings.py文件中添加STATICFILES_DIRS,设置静态文件目录路径,同templates. # settings.py文件中​STATIC_URL = '/st ...

  3. DJango 基础 (1)

    django基础 知识点: 基本认知 工具准备 新建项目 目录及文件说明 开发服务器 创建视图函数 新建应用(app) 1.基本认知 Django是用Python开发的一个免费开源的Web框架,可以用 ...

  4. spring boot 整合 elasticsearch 5.x

    spring boot与elasticsearch集成有两种方式.一种是直接使用elasticsearch.一种是使用data中间件. 本文只指针使用maven集成elasticsearch 5.x, ...

  5. Python设计模式 - UML - 类图(Class Diagram)

    简介 类图是面向对象分析和设计的核心,用来描述系统各个模块中类与类之间.接口与接口之间.类与接口之间的关系,以及每个类的属性.操作等特性,一般在详细设计过程中实施. 类图本身就是现实世界的抽象,是对系 ...

  6. Python开发【第八篇】:socket网络编程

    服务端: import socket server = socket.socket() #绑定要监听的端口 server.bind(('localhost',6969)) #监听 server.lis ...

  7. python动态模块导入

    首先创建一个模块目录lib,然后在目录内创建一个模块为:aa.py 官方推荐: import importlib aa = importlib.import_module('lib.aa') c = ...

  8. 46 【golang项目】完成了一个小小的播放器功能

    项目地址:https://github.com/helww/mylab/tree/master/go/player 这个项目中用到了readme说明文件是一个markdown文件. 基础的控制语法,网 ...

  9. Python基础-python简介(一)

    一.简介: python是一种面向对象的解释性计算机程序设计语言,由荷兰人Guido  von  Rossum于1989年的圣诞节发明. Python语言的特色: 1.python是一门解释性语言 解 ...

  10. node.js中net网络模块TCP服务端与客户端的使用

    node.js中net模块为我们提供了TCP服务器和客户端通信的各种接口. 一.创建服务器并监听端口 const net = require('net'); //创建一个tcp服务 //参数一表示创建 ...