*NIX系统安装ifconfig、telnet

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

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值