美文网首页Linux
Ubuntu系统的ifconfig命令无法使用

Ubuntu系统的ifconfig命令无法使用

作者: shenyoujian | 来源:发表于2018-11-29 19:33 被阅读295次

首先我百度了一下说要

设置环境变量,把/sbin加入path就ok了
vi /etc/profile
在最后加入export PATH="$PATH:/sbin"
保存一下
然后注销一下电脑,就可以用了

但是我加了也注销了并不好使。。。接着说要

Command 'ifconfig' not found, but can be installed with:

sudo apt install net-tools

那我就install吧

sudo apt install net-tools
[sudo] ljs 的密码: 
E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用)
E: 无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它?

我个暴脾气


image.png

接着百度说

1。终端输入 ps  aux ,列出进程。找到含有apt-get的进程,直接sudo kill PID。

2。强制解锁,命令
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

最后好啦。

相关文章

网友评论

    本文标题:Ubuntu系统的ifconfig命令无法使用

    本文链接:https://www.haomeiwen.com/subject/effqcqtx.html