其他分享
首页 > 其他分享> > ubantu18.04 没有ifconfig命令

ubantu18.04 没有ifconfig命令

作者:互联网

事情是起因就是这个ubantu18.04里没有ifconfig命令。
需要sudo apt-get install net-tools。
执行这个命令后,发现net-tools没办法安装,需要sudo apt update。
这个命令也报错,因为/etc/aptsources.list里的网址国内连不到,将文件的内容全部替换成下面的内容就行。

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
#centos源(放心使用):
deb http://centos.bitcomm.cn/ubuntu trusty main restricted universe multiverse
 
 
deb http://centos.bitcomm.cn/ubuntu trusty-security main restricted universe multiverse
 
 
deb http://centos.bitcomm.cn/ubuntu trusty-updates main restricted universe multiverse
 
 
deb http://centos.bitcomm.cn/ubuntu trusty-backports main restricted universe multiverse
 
 
deb http://centos.bitcomm.cn/ubuntu trusty-proposed main restricted universe multiverse
 
 
deb-src http://centos.bitcomm.cn/ubuntu trusty main restricted universe multiverse
 
 
deb-src http://centos.bitcomm.cn/ubuntu trusty-security main restricted universe multiverse
 
 
deb-src http://centos.bitcomm.cn/ubuntu trusty-updates main restricted universe multiverse
 
 
deb-src http://centos.bitcomm.cn/ubuntu trusty-backports main restricted universe multiverse
 
 
deb-src http://centos.bitcomm.cn/ubuntu trusty-proposed main restricted universe multiverse

到这里,又出现新的问题,因为用的是虚拟机,不能直接复制过去,手敲太麻烦了,想直接从电脑里复制过去需要安装vmwareTools。vmware-tools安装方法
直接拖进去还需要 sudo nautilus。
好的,到这里问题算是解决完了。
再次sudo apt update
sudo apt-get install net-tools
ifconfig就找到了。

标签:http,trusty,ubantu18.04,universe,ifconfig,命令,ubuntu,main,multiverse
来源: https://blog.csdn.net/D_mengxin/article/details/111126411