Simple operation of installing vi command in docker container
- 2021-10-11 19:59:32
- OfStack
When using docker container, sometimes vim is not installed inside. When you knock vim command, you will be prompted to say: vim: command not found. At this time, you need to install vim. However, when you knock apt-get install vim command, you will be prompted:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim
At this time, you need to knock:
apt-get update
The purpose of this command is to synchronize the indexes of the sources listed in the/etc/apt/sources. list and/etc/apt/sources. list. d to get the latest package.
Wait until the update is completed before typing the command:
apt-get install vim
Command will do.
Add: Install vim, telnet, ifconfig, ping commands in docker container
When using docker container, sometimes vim is not installed inside. When you knock vim command, you will be prompted to say: vim: command not found. At this time, you need to install vim. However, when you knock apt-get install vim command, you will be prompted:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim
At this time, you need to knock: apt-get update,
The purpose of this command is to synchronize the indexes of the sources listed in the/etc/apt/sources. list and/etc/apt/sources. list. d to get the latest package.
Wait until the update is completed before typing the command:
apt-get install vim
Installing vim
apt-get install telnet
Installing telnet
apt-get install net-tools
Installing ifconfig
apt install iputils-ping
Installing ping