Ubuntu 多线程下载软件

有时候因为更新源的原因,更新软件速度实在是太慢,所以需要多线程下载。

解决方法

1. 安装需要用到的软件包:

sudo apt-get install axel

2. 下载多线程脚本:

http://www.mattparnell.com/linux/apt-fast/apt-fast.sh

3. 将其移至 ~bin 目录:

sudo mv /your_dir/apt-fast.sh /usr/local/bin/apt-fast
sudo chmod +x /usr/bin/apt-fast

现在已经设置好了,默认是 4 线程同时下载,使用如下命令更新软件:

apt-fast update
apt-fast upgrade

手动修改线程数

1. 编辑 axel 的配置文件。

查找 # num_connections = 4,

vim /etc/axelrc

2. 将其后面追加:

num_connections = xx

xx 为自己需要的线程数,例如 6,太高了作用不大。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

5 × 5 =

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据