apt-get更新软件包_如何使用Apt-fast加速软件包下载和更新

apt-get更新软件包

apt-get更新软件包

By Default, Ubuntu uses apt-get to install packages and updates. Apt-get is a good tool but you can get much faster download speeds using Apt-Fast when downloading and updating your Ubuntu box.

默认情况下,Ubuntu使用apt-get安装软件包和更新。 Apt-get是一个很好的工具,但是在下载和更新Ubuntu盒时,您可以使用Apt-Fast获得更快的下载速度。

Apt-Fast is a script created by Matt Parnell that allows for up to 26x faster downloads. So how does it work? It is a script which uses Axel, a command line application which accelerates HTTP/FTP downloads. Well, the magic behind this is simple; it opens multiple connections to the server or multiple servers to download from. So basically it works like torrent client, downloading different pieces of the same file from different places simultaneously. Thus, reducing/eliminating the effect of server being overloaded.

Apt-Fast是由马特·帕内尔( Matt Parnell)创建的脚本,可将下载速度提高26倍。 那么它是怎样工作的? 它是使用Axel的脚本,Axel是可加速HTTP / FTP下载的命令行应用程序。 好吧,这背后的魔力很简单。 它会打开与该服务器或多个服务器的多个连接以供下载。 因此,基本上,它像洪流客户端一样工作,可以同时从不同位置下载同一文件的不同片段。 因此,减少/消除了服务器过载的影响。

To get Apt-Fast on your system, download the file “apt-fast.sh” from the link at the bottom. Once downloaded, open a terminal window to continue from there. Start by navigating to the file’s directory and rename it using this easy command:

要在您的系统上获取Apt-Fast,请从底部的链接下载文件“ apt-fast.sh”。 下载完成后,打开一个终端窗口以从那里继续。 首先导航到文件的目录,然后使用以下简单命令将其重命名:

mv apt-fast.sh apt-fast

mv apt-fast.sh apt-fast

Now you need to move the file to “/usr/bin” to make it executable. Do so by using:

现在,您需要将文件移动到“ / usr / bin”以使其可执行。 为此,请使用:

mv apt-fast /usr/bin/

mv apt-fast / usr / bin /

One last command to add execution permission to the file:

最后一个向文件添加执行权限的命令:

chmod +x apt-fast

chmod + x apt-fast

And we are done. Apt-fast is now installed and ready to run. For all future installing and updating operations substitute “apt-get” with “apt-fast” in the command line. For example:

我们完成了。 Apt-fast现在已安装并可以运行。 对于将来的所有安装和更新操作,在命令行中将“ apt-get”替换为“ apt-fast”。 例如:

apt-get install chromium

易于安装Chrome

Will be:

将会:

apt-fast install chromium

快速安装Chrome

And:

和:

apt-get update

apt-get更新

Will be:

将会:

apt-fast update

apt-快速更新

Enjoy your supercharged downloading speeds and don’t forget to come back for more interesting Ubuntu stuff.

享受增压的下载速度,别忘了回来获得更多有趣的Ubuntu东西。



Download apt-fast [via Mattparnell]

下载apt-fast [通过Mattparnell ]

翻译自: https://www.howtogeek.com/59265/how-to-speed-up-package-downloads-and-updates-with-apt-fast/

apt-get更新软件包

apt-get 命令可以用来下载软件包,可以使用以下命令将软件包下载到本地: ``` apt-get download package_name ``` 其中,`package_name` 为要下载软件包名称。此命令将在当前目录下下载软件包的 `.deb` 文件,但不会自动安装软件包。 如果您想要下载软件包及其所有依赖关系的 `.deb` 文件,可以使用以下命令: ``` apt-get --download-only install package_name ``` 此命令将下载软件包及其依赖的 `.deb` 文件到本地,但不会自动安装软件包。请注意,如果依赖关系已经在系统中存在,则不会下载它们。 如果您想要将下载软件包和依赖关系 `.deb` 文件复制到另一台计算机,可以使用以下命令将它们打包成一个压缩文件: ``` sudo apt-get clean sudo apt-get autoclean sudo apt-get autoremove sudo apt-get install apt-rdepends apt-rdepends -d package_name > dependencies.txt sudo apt-get download $(cat dependencies.txt | grep -v "^ ") tar czf package_name.tar.gz *.deb ``` 其中,`package_name` 为要下载软件包名称。这将生成一个名为 `package_name.tar.gz` 的压缩文件,其中包含软件包及其所有依赖关系的 `.deb` 文件。您可以将该文件复制到另一台计算机上,并使用以下命令进行安装: ``` tar xzf package_name.tar.gz sudo dpkg -i *.deb ``` 请注意,这种方法需要在两台计算机上安装 apt-rdepends 工具,其中一台计算机用于生成依赖列表,另一台用于安装软件包
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值