Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux
No Result
View All Result
Linuxips
No Result
View All Result
Home Debian

How to Install Deb Files (Packages) on Ubuntu

admin by admin
August 26, 2022
Reading Time: 4 mins read
0
How to Install deb Files on Ubuntu

In this article, we will learn how to install deb files on Ubuntu that are not available in official repositories of Ubuntu. Some other useful commands helpful for handling “.deb” packages will also be covered.

Contents hide
1 Prerequisites
2 Downloading deb Files
3 Installing deb Files from the Command Line
4 Installing deb files with apt
5 Installing deb files with dpkg
6 Installing deb files with gdebi
7 Installing deb Packages using GUI
8 Conclusion

Prerequisites

  • Access to a terminal
  • The apt package manager
  • A user with sudo privileges

Downloading deb Files

For the purposes of demonstration, we will download and install the VsCode deb file. Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft for Windows, Linux, and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.

Launch your web browser and navigate to the VsCode for Linux download page. Download the deb package by clicking on the Linux 64bit download link.

If you prefer the terminal, you can download the deb file with wget

$ wget https://az764295.vo.msecnd.net/stable/6d9b74a70ca9c7733b29f0456fd8195364076dda/code_1.70.1-1660113095_amd64.deb

Installing deb Files from the Command Line

When it comes to installing deb packages from the command line we have several tools. In the following sections, we will show you how to use apt, dpkg, and gdebi 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.

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 ./code_1.70.1_amd64.deb

if you will be prompted to type Y to continue:

$ sudo apt install ./code_1.70.1_amd64.deb 
[sudo] password for techdhee: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'code' instead of './code_1.70.1_amd64.deb'
The following NEW packages will be installed:
code
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B/85.2 MB of archives.
After this operation, 359 MB of additional disk space will be used.
Get:1 /home/techdhee/code_1.70.1_amd64.deb code amd64 1.70.1-1660113095 [85.2 MB]
Selecting previously unselected package code.
(Reading database ... 199013 files and directories currently installed.)
Preparing to unpack .../techdhee/code_1.70.1_amd64.deb ...
Unpacking code (1.70.1-1660113095) ...
Setting up code (1.70.1-1660113095) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...

The apt package manager will resolve and install all the package dependencies.

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 dpkg -i code_1.70.1_amd64.deb
$ sudo dpkg -i code_1.70.1_amd64.deb 
[sudo] password for techdhee: 
Selecting previously unselected package code.
(Reading database ... 199013 files and directories currently installed.)
Preparing to unpack code_1.70.1_amd64.deb ...
Unpacking code (1.70.1-1660113095) ...
Setting up code (1.70.1-1660113095) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2) ...

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 code_1.70.1_amd64.deb

Type y when prompted and gdebi will resolve and install the deb package and all its dependencies for you.

Note:- Unlike apt and dpkg and gdebi don’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
$ sudo gdebi code_1.70.1_amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reading state information... Done

Code editing. Redefined.
 Visual Studio Code is a new choice of tool that combines the simplicity of
 a code editor with what developers need for the core edit-build-debug cycle.
 See https://code.visualstudio.com/docs/setup/linux for installation
 instructions and FAQ.
Do you want to install the software package? [y/N]:y
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1
  c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
Selecting previously unselected package code.
(Reading database ... 215242 files and directories currently installed.)
Preparing to unpack code_1.70.1_amd64.deb ...
Unpacking code (1.70.1-1660113095) ...
Setting up code (1.70.1-1660113095) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2) ... 

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 or right click on it.

Install vscode using gdebi on Ubuntu

This will open the default distro Graphical Software Center:

Install vscode using gdebi

The installation may take some time depending on the file size and its dependencies.

Install vscode using gdebi

Once the deb package is installed, the “Install” button within the Ubuntu Software Center will change to “Remove”.

Install vscode using gdebi

That’s all, the application has been installed on your system and you can start using it.

Conclusion

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.

Related Linux Tutorials:

  • How to Install Cisco Packet Tracer on Ubuntu.
  • How to install Tweak Tool on Ubuntu 21.04.
  • ZSH to BASH | How to Install ZSH on Ubuntu.
  • How to Install Ubuntu.
  • How to Install PuTTY on Ubuntu
ShareTweetSendShareShare
Previous Post

How to Install Visual Studio Code on Debian 11

Next Post

How to Install Flatpak on Debian 11

admin

admin

Linuxips is a Linux blog that publishes articles and tutorials about server operations, installations, new techniques and Linux security.

Related Posts

How To Use AppImage in Linux
Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu
Linux

How To Install uGet Download Manager On Ubuntu

March 8, 2023
How to Install ZSH on Ubuntu 22.10
Ubuntu

How to Install ZSH on Ubuntu 22.10

March 7, 2023
How to Install Terminator on Ubuntu
Ubuntu

How to Install Terminator on Ubuntu, a Linux Terminal Emulator

March 2, 2023
How to Install Tweak Tool on Ubuntu
Ubuntu

How to install Tweak Tool on Ubuntu 22.04

February 28, 2023
How to Install Ubuntu 22.10 (Kinetic Kudu)
Ubuntu

How to Install Ubuntu 22.10 | Ubuntu for Desktop

January 26, 2023

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

You might also like

Install ZSH on Arch Linux

How to Install ZSH on Arch Linux

January 6, 2024
How to Install ZSH on Kali Linux 2024.1

How to Install ZSH on Kali Linux

January 5, 2024
How To Use AppImage in Linux

How To Use AppImage in Linux [Complete Guide]

April 2, 2023
How To Install uGet Download Manager On Ubuntu

How To Install uGet Download Manager On Ubuntu

March 8, 2023
How to Install ZSH on Ubuntu 22.10

How to Install ZSH on Ubuntu 22.10

March 7, 2023
Linux Files and Directories

Linux Files and Directories

March 3, 2023

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.

  • Home
  • Web Stories
  • Privacy Policy
  • Contact Us
  • Disclaimer
No Result
View All Result
  • Home
  • Linux
  • Debian
  • Ubuntu
  • Fedora
  • Arch Linux

© 2024 Linuxips.com - Linux Tips, Tricks and Tutorials.