Debian Systems like Ubuntu and others’ software packages has the extension .deb. With the file, you can install softwares on your system. While you click the “Install” button on Ubuntu Software Center or on Synaptic Package Manger, what the system actually do is downloading the .deb file from the server and installing it.
These .deb files are installed using the dpkg software. It’s not necessarily required for you to have internet to install softwares, but if you don’t have the dependencies of the software, internet is required for the software to download and install it.
If you’re a newbie to the Debian, Linux Platform, here’s what some of the terms mean :
- Package – The Software File that is used to install a software. In Windows, it will be a file called “setup.exe”
- Dependency – For working of some softwares, other softwares are needed. An Example : Google Chrome needs the WebKit Package for rendering Web pages
- “.deb” files – The install Package is of the extension “.deb” as opposed to “.exe” in Windows
- dpkg – A command line (Terminal) tool / software to install “.deb” packages.
- Synaptic Package Manager – A Graphical (GUI) application for installing softwares in Linux systems. Will take care of everything for the installation of software
- Command Line – The Terminal. On some systems, it can be opened using CTRL + ALT + T key combination.
This tutorial will help you to do these following things :
- Install Softwares in your Debian (Ubuntu) system Without Internet (Offline)
- Install Dependencies with Original Software Offline
- Getting the Offline .deb Packages
As I said before, Software Center & Synaptic Package Manger downloads the .deb files to a folder on your system. The folder is :
If the packages are completely downloaded, it’s file is seen there. If it’s only partially downloaded, it’s seen in the partial folder.
We only need the fully downloaded packages. On installing a fresh System, this folder will be empty. So, you can install a software via Software Center and see it’s package and dependency packages (maybe) in the folder.
If it have dependencies, you have to copy the whole .deb files and paste it in a single folder or if it’s a single file, you only have to copy that file.
An another way (complicated) is to get the “.deb” file from internet. Though it is risky, because you need to know the architecture of your system and find & download dependencies manually. Here are the site addresses :
- Debian – https://www.debian.org/distrib/packages
- Ubuntu – http://packages.ubuntu.com/
Debian & Ubuntu have some major differences although they have many similarities. Don’t install packages of Debian in Ubuntu, because it can cause unexpected Results.
I highly recommend you use Synaptic Package Manger. If your system doesn’t have it, install it using the following terminal command :
sudo apt-get install synaptic
Suppose, the software you’re going to install is Firefox. Gladly, it doesn’t require any dependencies, because it’s already in the system.
The Package File name is “firefox-30-lucid-32.deb” and it’s situated in the “/home/simsu” directory. We will use the following command in Terminal to install this software :
sudo dpkg -i /home/simsu/firefox-30-lucid-32.deb
The installation status will be automatically printed. If there’s any dependency issue, it will also be printed out. So, you have to install the dependency package name mentioned using Synaptic.
We have a folder named “firefox” in the directory “/home/simsu” with dependencies’ packages and the main “firefox-30-lucid-32.deb” package files. We will pint the terminal directory to the folder and use a single command to install software with the dependencies that are in the same folder.
First, point the terminal to the directory :
and tell dpkg to install all softwares that are in the directory :
dpkg -i *.deb
The softwares will be installed one by one. Though, there may be some dependency issues, because some files won’t be installed in the right order. In this case, do the command again one or 3 times until everything is OK.