通过导入安装包安装方法相对比较麻烦,推荐使用apt或yum命令直接进行安装,亲测可用!
ubuntu安装命令:
sudo apt install lrzsz
centos安装命令:
sudo yum install lrzsz
或者用下面这个也可以
sudo yum provides */rz
安装过程如下(仅展示centos7的安装,安装过程中提示需要按Y键确认安装):
[root@instance-1 ~]# sudo yum install lrzsz
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 17 kB 00:00
* base: mirror.fileplanet.com
* centos-sclo-rh: repos.lax.quadranet.com
* centos-sclo-sclo: repos.lax.quadranet.com
* elrepo: mirror-hk.koddos.net
* elrepo-kernel: mirror-hk.koddos.net
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: repos.lax.quadranet.com
* updates: mirror.fileplanet.com
base | 3.7 kB 00:00
centos-sclo-rh | 2.9 kB 00:00
centos-sclo-sclo | 2.9 kB 00:00
elrepo | 2.9 kB 00:00
elrepo-kernel | 2.9 kB 00:00
elrepo-kernel/primary_db | 13 kB 00:00
epel | 5.3 kB 00:00
epel/primary_db | 6.1 MB 00:00
extras | 3.4 kB 00:00
google-cloud-compute/signature | 454 B 00:00
google-cloud-compute/signature | 1.4 kB 00:00 ...
google-cloud-compute/primary | 3.7 kB 00:00
google-cloud-compute 8/8
updates | 3.4 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package lrzsz.x86_64 0:0.12.20-27.1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================
Installing:
lrzsz x86_64 0.12.20-27.1.el6 base 71 k
Transaction Summary
=========================================================================================================================
Install 1 Package(s)
Total download size: 71 k
Installed size: 159 k
Is this ok [y/N]: y
Downloading Packages:
lrzsz-0.12.20-27.1.el6.x86_64.rpm | 71 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : lrzsz-0.12.20-27.1.el6.x86_64 1/1
Verifying : lrzsz-0.12.20-27.1.el6.x86_64 1/1
Installed:
lrzsz.x86_64 0:0.12.20-27.1.el6
Complete!
最后Complete安装完毕!
这样就可用Xshell软件通过ssh上传和下载文件到Linux的任意目录,注意Putty不支持哦!输入rz命令弹出文件管理器选择文件上传: