Let us say, you have a system (Windows or Linux) with high-speed Internet connection at work and a Debian or any Debian derived systems with no internet connection or very slow Internet connection(like dial-up) at home. You want to upgrade your offline home system. What would you do? Buy a high speed Internet connection? Not necessary! You still can update or upgrade your offline system with Internet. This is where Apt-Offline comes in help.

As the name says, apt-offline is an Offline APT Package Manager for APT based systems like Debian and Debian derived distributions such as Ubuntu, Linux Mint. Using apt-offline, we can fully update/upgrade our Debian box without the need of connecting it to the Internet. It is cross-platform tool written in the Python Programming Language and has both CLI and graphical interfaces.

Requirements

  • An Internet connected system (Windows or Linux). We call it online system for the sake of easy understanding throughout this guide.
  • An Offline system (Debian and Debian derived system). We call it offline system.
  • USB drive or External Hard drive with sufficient space to carry all updated packages.

Installation

Apt-Offline is available in the default repositories of Debian and derivatives. If your Online system is running with Debian, Ubuntu, Linux Mint, and other DEB based systems, you can install Apt-Offline using command:

sudo apt-get install apt-offline

If your Online runs with any other distro than Debian, git clone Apt-Offline repository:

git clone https://github.com/rickysarraf/apt-offline.git

Go the directory and run it from there.

cd apt-offline/
sudo ./apt-offline

Steps to do in Offline system (Non-Internet connected system)

Go to your offline system and create a directory where you want to store the signature file:

mkdir ~/tmp
cd ~/tmp/

You can use any directory of your choice. Then, run the following command to generate the signature file:

sudo apt-offline set apt-offline.sig

Sample output would be:

Generating database of files that are needed for an update.

Generating database of file that are needed for operation upgrade

By default, apt-offline will generate database of files that are needed to be update and upgrade. You can use update or --upgrade options to create database for either one of these.

Copy the entire tmp folder in an USB drive or external drive and go to your online system (Internet-enabled system).

Steps to do in Online system

Plug in your USB drive and go to the temp directory:

cd tmp/

Then, run the following command:

sudo apt-offline get apt-offline.sig --threads 5 --bundle apt-offline-bundle.zip

Here, “–threads 5” represents the number of APT repositories. You can increase the number if you want to download packages from more repositories. And, “–bundle apt-offline-bundle.zip” option represents all packages will be bundled in a single archive file called apt-offline-bundle.zip. This archive file will be saved in your current working directory.

The above command will download data based on the signature file generated earlier in the offline system.

This will take several minutes depending upon the Internet connection speed. Please note that apt-offline is cross platform, so you can use it to download packages on any OS.

Once completed, copy the tmp folder to USB or External drive and return back to the offline system. Make sure your USB device has enough free space to keep all downloaded files, because all packages are available in the tmp folder now.

Steps to do in offline system

Plug in the device in your offline system and go to the tmp directory where you have downloaded all packages earlier.

cd tmp

Then, run the following command to install all download packages.

sudo apt-offline install apt-offline-bundle.zip

This will update the APT database, so APT will find all required packages in the APT cache.

Note: If both online and offline systems are in the same local network, you can transfer the tmp folder to the offline system using “scp” or any other file transfer applications. If both systems are in different places, copy the folder using USB devices.

And, that’s all for now folks. I hope this guide will useful for you. More good stuffs to come. Stay tuned!

Cheers!

Resource:

Fully Update And Upgrade Offline Debian-based Systems的更多相关文章

  1. ubuntu sudo update与upgrade的作用及区别

    ubuntu sudo update与upgrade的作用及区别 入门linux的同志,刚开始最迫切想知道的,大概一个是中文输入法,另一个就是怎么安装软件.本文主要讲一下LINUX安装软件方面的特点. ...

  2. Ubuntu点滴--apt-get update和upgrade的作用

    update update is used to resynchronize the package index files from their sources. The indexes of av ...

  3. Linux中的update和upgrade的区别

    update是更新源里的软件列表 upgrade顾名思义是升级,升级你系统里的软件

  4. ubuntu 手动更新源 以及使用sudo update与upgrade的作用及区别

    一.今天更新一下我的ubuntu系统,用了几个源发现不怎么好用 上网查了一下发现有说阿里云的源挺好用 然后我试了一下 下载速度还挺快,下面分享一下怎么手动添加源列表 1.最好先做一下备份 sudo c ...

  5. 树莓3B+_apt-get update && apt-get upgrade

    在Windows下安装软件,我们只需要有EXE文件,然后双击,下一步直接OK就可以了.但在LINUX下,不是这样的.每个LINUX的发行版,都会维护一个自己的软件仓库,我们常用的几乎所有软件都在这里面 ...

  6. Linux中的update和upgrade的作用

    update 是同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包.update是下载源里面的metad ...

  7. 【linux】记录一个yum update和upgrade的区别

    yum update 更新软件包和系统软件.系统内核 yum upgrade只更新软件包,不更新系统软件和系统内核 查看版本号 [root@localhost ~]# uname -r 3.10.0- ...

  8. download plugin update site for offline installation

    Reference Eclipse Launcher Running update manager from command line   好多次为window下的eclipse不能拿到linux下直 ...

  9. apt-get update 和 upgrade 的区别

    http://blog.csdn.net/duyiwuer2009/article/details/26983267

随机推荐

  1. linux操作系统2 linux常用命令

    知识内容: 1.目录及文件操作 2.用户.群组与权限 3.重定向.管道 4.磁盘存储管理 5.系统命令 6.其他命令 参考: http://man.linuxde.net/ Linux命令规则:目录名 ...

  2. stdio.h头文件中申明的基本函数

    调用scanf函数时,需传入变量的地址作为参数,scanf函数会等待标准输入设备(键盘等)输入数据,并且将输入的数据赋值给地址对应的变量. #include<stdio.h> #inclu ...

  3. Nginx相关笔记

    相关参考: 编译安装测试nginx            https://www.cnblogs.com/jimisun/p/8057156.html

  4. leetcode929

    package main import ( "fmt" "strings" ) func numUniqueEmails(emails []string) in ...

  5. 24.OGNL与ValueStack(VS)-集合对象初步

    转自:https://wenku.baidu.com/view/84fa86ae360cba1aa911da02.html 首先在LoginAction中增加如下字段并提供相应的get/set方法: ...

  6. Spring MVC 异常处理 - ResponseStatusExceptionResolver

    作用在类和方法上面 更改返回的代码和错误消息 类上 通过throw new UserName***Exception()抛出 @ResponseStatus(value=HttpStatus.FORB ...

  7. as3 区别中文 英文 数字

    1)英文a-z是65-90,A-Z是97-112 2)数字是0-9是,48-57 3)上万的都是中文字符 var str:String = "hello world! 你好世界! 88!&q ...

  8. HibernateTemplate使用注意点

    1.  findByExample(vo) 可轻松根据vo的内部数据作为参数查找数据,vo中的基本类型不能为null,同时不支持主键查找. 2. get(vo.class, id) 根据主键来查找数据 ...

  9. AI-人工智能-参考文档

     人工智能——目录汇总: https://blog.csdn.net/qq_27297393/article/details/80685474   人工智能——高数篇: https://blog.cs ...

  10. vue深入了解组件——插槽

    一.插槽内容 Vue实现了一套内容分发的API,这套API基于当前的Web Components规范草案,将 <slot>  元素作为承载分发的内容的出口. 它允许你像这样合成组件: &l ...