you will need a USB flash drive.

What we will do is like running ‘sudo apt-get install package’, but since we do not have an internet connection we will do it manually.

In my case I use Ubuntu Server, I don’t have a friendly graphical interface, only a command line.

Ubuntu packages are used for normal Ubuntu and Ubuntu Server.

where should you download a package? you should look for it in

https://packages.ubuntu.com

packages are downloaded with deb extension.

What is a .deb file?

A .deb file is a software package for Debian-based operating systems such as Ubuntu, Debian, Linux Mint, and others. .deb files contain compiled software ready to be installed on an operating system.

.deb files can be installed using the dpkg -i command or apt on Debian-based operating systems. For example:

sudo dpkg -i package_name.deb

copy the package to the usb on the pc with internet.

connect the usb to the pc without internet.

On the PC without internet this will show you the list of connected devices, including the USB.

fdisk -l

Mount the USB: Mount the USB using the mount command. For example, if the USB is connected to /dev/sdb1, you can mount it to /mnt as follows:

sudo mount /dev/sdb1 /mnt

You should not write the name of a device, but a partition.

because /dev/sdb is the entire device, not a partition. sdb1 is a partition.

then you must do:

cd /mnt

find the folder that contains the downloaded package.

and run:

sudo dpkg -i file_name.deb

If the .deb file has dependencies, you can resolve them using the command:

apt-get install -f

then install the package again.

That’s it, it’s like running sudo apt-get install but without internet access.