Deb is the installation package format used by all Debian based distributions.
The Ubuntu repositories contain thousands of deb packages that can be installed either from the Ubuntu Software Center or from the command line using the apt and apt-get utilities.
Many applications are not included in the Ubuntu or any 3rd party repositories. Those applications have to be downloaded from the developer’s websites and installed manually. Be extra careful when installing deb packages from unofficial sources.
In this tutorial, we will explain how to install deb files on Ubuntu 18.04. The same instructions apply for Ubuntu 16.04 and any Debian based distribution, including Debian, Linux Mint and Elementary OS.
- You must be registered with Alibaba Cloud.
- You must have added and verified your payment method.
- If you are a new user, after payment method verification you can claim free $450 – $1300 credits. You can register new account and claim your free credits.
- To setup up your ECS for the first time, you can refer to this tutorial or quick-start guide.
- Domain registration is recommended for setting up FQDN hostname of your server. But if you are willing to use IP address directly, you may skip this.
- If you have registered domain with any 3rd party, you may transfer into Alibaba Cloud.
- If you are using the domain name, remember to point your domain name to IP address of your server.
- You should set up your server’s hostname.
- Access to VNC console in your Alibaba Cloud or SSH client installed in your PC.
- Login as root user and create a user with sudo privileges.
Downloading deb Files
For the purposes of demonstration, we will download and install the TeamViewer deb file . TeamViewer is an all-in-one solution for remote support, desktop sharing, online meetings, and file transfer between computers.
Launch your web browser and navigate to the TeamViewer for Linux download page . Download the deb package by clicking on the Ubuntu and Debian download link.
If you prefer the terminal, you can download the deb file with wget or curl :
$ wget --no-check-certificate https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
$ curl -k -O -L https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
Installing deb Files from the Command Line
When it comes to installing deb packages from the command line you have several tools at your disposal. In the following sections, we will show you how to use apt, gdebi, and dpkg utilities to install deb packages.
Installing deb files with apt
apt is a command-line utility for installing, updating, removing, and otherwise managing deb packages on Ubuntu, Debian, and related Linux distributions. It was introduced in Ubuntu 14.04 and combines the most commonly used commands from apt-get and apt-cache.
To install local deb packages with apt you need to provide the full path to the deb file. If the file is located in your current working directory instead of typing the absolute path, you can prepend ./ before the package name. Otherwise, apt will try to retrieve and install the package from Ubuntu’s repositories.
$ sudo apt install ./teamviewer_amd64.deb
You will be prompted to type Y to continue:
Output ... 0 upgraded, 84 newly installed, 0 to remove and 64 not upgraded. Need to get 21.0 MB of archives. After this operation, 66.3 MB of additional disk space will be used. Do you want to continue? [Y/n] The apt package manager will resolve and install all the package dependencies.
The apt package manager will resolve and install all the package dependencies.
Installing deb files with gdebi
gdebi is a tool for installing local deb packages. It is not installed by default in Ubuntu, but you can install it with the following command:
$ sudo apt install gdebi
To install the deb package with gdebi type:
$ sudo gdebi teamviewer_amd64.deb
Output ... Do you want to install the software package? [y/N]:
Type y when prompted and gdebi will resolve and install the deb package and all its dependencies for you.
Installing deb files with dpkg
dpkg is a low-level package manager for Debian-based systems. Use the -i (or –install) option to install deb packages with dpkg.
$ sudo apt install ./teamviewer_amd64.deb
Unlike apt and gdebi, dpkg doesn’t resolve dependencies. If you get any dependency errors when installing deb packages, you can use the following apt command to resolve and install all package dependencies:
$ sudo apt install -f
Installing deb Packages using GUI
If you prefer to use a graphical interface, simply download the deb file and open it with a double click.
This will open the default distro Graphical Software Center:
Click on the Install button and the Authenticate dialog box will open.
Enter the administrative password and click on the Authenticate button.
The installation may take some time depending on the file size and its dependencies. Once the deb package is installed, the “Install” button within the Ubuntu Software Center will change to “Remove”.
That’s all, the application has been installed on your system and you can start using it.
We have shown you how to install local deb files in Ubuntu. When installing packages from the command line prefer using apt as it will resolve and install all the package dependencies.