给apt-get 加速

通过使用Axel和一个bash脚本,可以显著提升Linux系统中apt-get的下载速度。该脚本适用于Debian、Ubuntu等使用apt-get的发行版。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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!

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值