Ubuntu安装ifconfig、ping
apt-get update
apt install net-tools # ifconfig
apt install iputils-ping # ping
root@4bda5ebc8b73:/# apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-secur
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRele
Get:3 http://archive.ubuntu.com/ubuntu xenial-update
Get:4 http://archive.ubuntu.com/ubuntu xenial-backpo
Get:5 http://archive.ubuntu.com/ubuntu xenial-update
Get:6 http://archive.ubuntu.com/ubuntu xenial-update
]
Fetched 1944 kB in 9s (195 kB/s)
Reading package lists... Done
root@4bda5ebc8b73:/# apt install net-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
net-tools
0 upgraded, 1 newly installed, 0 to remove and 1 not
Need to get 175 kB of archives.
After this operation, 725 kB of additional disk spac
Get:1 http://archive.ubuntu.com/ubuntu xenial/main a
u1 [175 kB]
Fetched 175 kB in 1s (101 kB/s)
debconf: delaying package configuration, since apt-u
Selecting previously unselected package net-tools.
(Reading database ... 13642 files and directories cu
Preparing to unpack .../net-tools_1.60-26ubuntu1_amd
Unpacking net-tools (1.60-26ubuntu1) ...
Setting up net-tools (1.60-26ubuntu1) ...
root@4bda5ebc8b73:/# apt install iputils-ping
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libgnutls-openssl27
The following NEW packages will be installed:
iputils-ping libgnutls-openssl27
0 upgraded, 2 newly installed, 0 to remove and 1 not
Need to get 74.7 kB of archives.
After this operation, 265 kB of additional disk spac
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-update
amd64 3.4.10-4ubuntu1.4 [22.0 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main a
1-5ubuntu2 [52.7 kB]
Fetched 74.7 kB in 1s (50.8 kB/s)
debconf: delaying package configuration, since apt-u
Selecting previously unselected package libgnutls-op
(Reading database ... 13690 files and directories cu
Preparing to unpack .../libgnutls-openssl27_3.4.10-4
Unpacking libgnutls-openssl27:amd64 (3.4.10-4ubuntu1
Selecting previously unselected package iputils-ping
Preparing to unpack .../iputils-ping_3%3a20121221-5u
Unpacking iputils-ping (3:20121221-5ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libgnutls-openssl27:amd64 (3.4.10-4ubuntu
Setting up iputils-ping (3:20121221-5ubuntu2) ...
Setcap is not installed, falling back to setuid
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Ubuntu安装telnet
安装openbsd-inetd:
#sudo apt-get install openbsd-inetd
安装telnetd:
#sudo apt-get install telnetd
查看telnet运行状态
#netstat -a | grep telnet
输出: tcp 0 0 *:telnet *:* LISTEN
CentOS查看yum
λ docker start cent
cent
E:\wamp\www
λ docker attach cent
[root@527e6ae9a2cb /]# rpm -qa | grep yum
yum-plugin-fastestmirror-1.1.31-42.el7.noarch
yum-utils-1.1.31-42.el7.noarch
yum-metadata-parser-1.1.4-10.el7.x86_64
yum-3.4.3-154.el7.centos.noarch
yum-plugin-ovl-1.1.31-42.el7.noarch
[root@527e6ae9a2cb /]#
CentOS安装yum
wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz
tar xvf yum-3.2.28.tar.gz
cd yum-3.2.28
yummain.py install yum
yum check-update
yum update
yum clean all
CentOS安装ifconfig、ping
yum install net-tools
CentOS安装telnet
yum install telnet
yum install telnet-server

本文介绍了如何在Ubuntu和CentOS操作系统上安装ifconfig、ping以及telnet。首先,讲述了在Ubuntu系统中安装这两个网络工具的步骤,接着详细说明了在CentOS上查看和安装yum,以及通过yum安装ifconfig、ping和telnet的流程。
824

被折叠的 条评论
为什么被折叠?



