网上找了半天,都是centos的,ubuntu老版本装tunctl的命令也不能用了
$ sudo tunctl
sudo: tunctl: command not found
$ sudo apt install tunctl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package tunctl
终于在【Ubuntu】添加虚拟网卡的三种方式_widiot的博客-CSDN博客_ubuntu 添加虚拟网卡找到了,原来要装uml-utilities
$ sudo apt install uml-utilities
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
user-mode-linux
The following NEW packages will be installed:
uml-utilities
0 upgraded, 1 newly installed, 0 to remove and 21 not upgraded.
Need to get 50.3 kB of archives.
After this operation, 289 kB of additional disk space will be used.
Get:1 http://nova.clouds.archive.ubuntu.com/ubuntu focal/universe amd64 uml-utilities amd64 20070815.3-1 [50.3 kB]
Fetched 50.3 kB in 1s (40.1 kB/s)
Selecting previously unselected package uml-utilities.
(Reading database ... 103903 files and directories currently installed.)
Preparing to unpack .../uml-utilities_20070815.3-1_amd64.deb ...
Unpacking uml-utilities (20070815.3-1) ...
Setting up uml-utilities (20070815.3-1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.13) ...
检验一下,tunctl命令可以用了
$ sudo tunctl
Set 'tap0' persistent and owned by uid 0