查看内网IP地址
$ ip a
如果是图形界面,在系统设置浏览到“网络”选项卡,然后单击网络连接的相应齿轮图标,可以查看内网IP地址。
查看外网IP地址
安装了curl
命令
$ sudo apt install curl
使用下面命令查看外网IP地址:
$ curl -w "\n" -s https://api.ipify.org
日期:2020-07-07 20:55:14 来源:oir作者:oir
$ ip a
如果是图形界面,在系统设置浏览到“网络”选项卡,然后单击网络连接的相应齿轮图标,可以查看内网IP地址。
安装了curl
命令
$ sudo apt install curl
使用下面命令查看外网IP地址:
$ curl -w "\n" -s https://api.ipify.org