Ubuntu安装后没有ifconfig命令?

两盒软妹~` 提交于 2019-11-25 20:59:26

Ubuntu安装后安装后没有ifconfig命令,如下

magic@Ubuntu:~/桌面$ ifconfig

Command ‘ifconfig’ not found, but can be installed with:

sudo apt install net-tools

安装 sudo apt install net-tools

magic@Ubuntu:~/桌面$ sudo apt install net-tools
[sudo] magic 的密码:
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
下列软件包是自动安装的并且现在不需要了:
libllvm7
使用’sudo apt autoremove’来卸载它(它们)。
下列【新】软件包将被安装:
net-tools
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 194 kB 的归档。
解压缩后会消耗 803 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 net-tools amd64 1.60+git20161116.90da8a0-1ubuntu1 [194 kB]
已下载 194 kB,耗时 2秒 (88.2 kB/s)
正在选中未选择的软件包 net-tools。
(正在读取数据库 … 系统当前共安装有 162875 个文件和目录。)
正准备解包 …/net-tools_1.60+git20161116.90da8a0-1ubuntu1_amd64.deb …
正在解包 net-tools (1.60+git20161116.90da8a0-1ubuntu1) …
正在设置 net-tools (1.60+git20161116.90da8a0-1ubuntu1) …
正在处理用于 man-db (2.8.3-2ubuntu0.1) 的触发器 …

重新执行ifconfig

`
magic@Ubuntu:~/桌面$ ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.103 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::432:f445:f822:620b prefixlen 64 scopeid 0x20
ether 08:00:27:8e:50:ca txqueuelen 1000 (以太网)
RX packets 11012 bytes 973269 (973.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1703 bytes 114552 (114.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::e703:7d01:8ebb:b376 prefixlen 64 scopeid 0x20
ether 08:00:27:4d:54:8d txqueuelen 1000 (以太网)
RX packets 244788 bytes 347829591 (347.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 110344 bytes 7360225 (7.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (本地环回)
RX packets 1110 bytes 242554 (242.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1110 bytes 242554 (242.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0`

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!