给apt-get 加速

Axel is a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file. For example, some FTP sites limit the speed of each connection, therefore opening more than one connection at a time multiplies the allowable bandwidth.

What if we could use a bash script to use "apt-get" with Axel so the "apt-get" download speed would increase dramatically? Well, you can, thanks to Matt Parnell who has created a bash script which does just that. The script works with any Linux distribution which uses "apt-get" (Debian, Ubuntu, etc.).

Before using the script, you must install Axel:  

Then create an empty file called apt-fast and paste this:

 

 

Then use the terminal to navigate to where you created the script and run this command:

 

 

For easier usage, you can move it to the /usr/bin folder.

Now, instead of using: sudo apt-get install PACKAGE_NAME, use sudo apt-fast install PACKAGE_NAME or upgrade or dist-upgrade - it also works with those operations.

I must say I have obviously tested the script and indeed, it works really fast. I don't know if it's 26x faster as the author claims, but the speed improvement, well, let's just say you won't need to measure it to notice the difference!

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
apt-get加速可以通过使用apt-fast工具来实现。apt-fast是一个基于aria2下载工具的加速工具,它可以通过增加下载线程的方式来提高apt-get/apt命令的下载速度。你可以参考https://wiki.ubuntu.org.cn/Apt-fast获取更详细的信息。在Ubuntu 11.04到13.10版本上,你可以通过以下命令来安装apt-fast:sudo apt-get install axel。此外,你还可以参考无籽西瓜吃吗的博客中有关解决Ubuntu使用apt-get下载速度慢的方法。另外,如果你在docker容器内安装软件时遇到速度慢的问题,你可以尝试使用网易加速和阿里云加速来提升软件安装的速度,如安装ps、vi、telnet、netstat等命令。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Ubuntu使用apt-get install安装程序下载速度慢?apt-fast加速下载。](https://download.csdn.net/download/weixin_38592848/14052276)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [【docker内linux apt-get换源下载 | 实测可行】apt-get下载提速 | 源自国内阿里源 | docker内apt-get换源](https://blog.csdn.net/m0_61139217/article/details/125708428)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [docker容器内执行apt-get update命令时很慢的解决办法](https://download.csdn.net/download/weixin_42147939/13123553)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值