Skip to content

Binary packages

.deb files

Binary packages on Ubuntu are often provided as .deb files (short for Debian). .deb is the Debian package format and the most common way of installing programs in Ubuntu.

To install a binary package (.deb file), you can use apt.

fast →sudo apt install ./package_file.deb

restart ↻

If the package has any dependencies that are not currently installed, install those dependencies:

fast →sudo apt --fix-broken install

restart ↻

For example, let's install a terminal browser browsh

First download the .deb file to the /tmp folder

fast →cd /tmp19:58:14 with abc in /tmp

wget https://github.com/browsh-org/browsh/releases/download/v1.8.2/browsh_1.8.2_linux_amd64.deb
Saving to: ‘browsh_1.8.2_linux_amd64.deb’
browsh_1.8.2_linux_amd64.deb 100%[============================>] 3.54M 9.69MB/s in 0.4s
2023-06-19 14:39:11 (9.69 MB/s) - ‘browsh_1.8.2_linux_amd64.deb’ saved [3711462/3711462]

restart ↻

Install browsh with apt

fast →sudo apt install ./browsh_1.8.2_linux_amd64.deb browsh_1.8.2_linux_amd64.deb
(Reading database ... 43419 files and directories currently installed.)
Preparing to unpack browsh_1.8.2_linux_amd64.deb ...
Unpacking browsh (1.8.2) ...
dpkg: dependency problems prevent configuration of browsh:
browsh depends on firefox | firefox-esr; however:
Package firefox is not installed.
Package firefox-esr is not installed.

dpkg: error processing package browsh (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
browsh

restart ↻

Finally we will install missing dependent packages

fast →sudo apt --fix-broken install -y...
update-alternatives: using /usr/bin/firefox to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
Please restart all running instances of firefox, or you will experience problems.
Setting up browsh (1.8.2) ...
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.40.0+dfsg-3ubuntu0.4) .

restart ↻

Compiled executables

When you download an executable and want to make it available system-wide (so that you can run it from any location in the terminal), you need to put it into a directory that's listed in your system's PATH.

There are several folders that are already included in the PATH

  • /home/abc/bin/
  • /home/abc/.local/bin/

For example, let's install EJSON - a small library to manage encrypted secrets using asymmetric encryption.

Download archeive file from the ejson releases

fast →cd /tmp08:01:30 with abc in /tmp

wget wget https://github.com/Shopify/ejson/releases/download/v1.4.0/ejson_1.4.0_linux_386.tar.gz
ejson_1.4.0_linux_386.tar.gz 100%[================================>] 1.36M 2.33MB/s in 0.6s
2023-06-19 15:27:29 (2.33 MB/s) - ‘ejson_1.4.0_linux_386.tar.gz’ saved [1425818/1425818]

restart ↻

Extract the binary file from tar archeive

fast →tar -xzf ejson_1.4.0_linux_386.tar.gz08:01:31 with abc in /tmp

restart ↻

Add executable permissions to a file

fast →chmod +x ejson08:01:31 with abc in /tmp

restart ↻

Move the binary to the folder, which is listed in the $PATH environmental variable.

fast →mv ejson /home/abc/bin/08:01:32 with abc in /tmp

restart ↻

Now we can use ejson

fast →ejson keygen
Public Key:
fd8f94024c1aa87slc4b8235a3a0ed8a5b494e10f61cf4c65aa119824b562f57
Private Key:
082d650b5671b96b599b7dbs213acb8e53dc47ff9211010249c48478d427cc20

restart ↻