How to Build Deb Package in Ubuntu/Debian Linux

This tutorial is about How to Build Deb Package in Ubuntu/Debian Linux. We will try our best so that you understand this guide. I hope you like this blog, How to Build Deb Package in Ubuntu/Debian Linux. If your answer is yes, please do share after reading this.

So lets keep reading for intertesting info:

Check How to Build Deb Package in Ubuntu/Debian Linux

The Debian Linux distribution uses the “deb” package format. For a wide variety of open source software, the Ubuntu operating system comes with thousands of deb packages. The distribution documentation is available on, however it can be difficult to read. For use with the official Debian distribution, the documentation is designed. But it is extremely simple to create a Debian package for personal distribution. For a radio terminal called Tera, I recently made my first Debian package. I will describe how to use my Tera files to create a core Debian package in this article.

How to compile a Deb package on Ubuntu/Debian Linux

Give your debut package a name

First we need to name our desired deb package. The standard notation for naming deb packages is as follows.


For example, you can name your project a


Create directory with package name

Next, create a new directory with the same name as your old package, including version numbers.

$ mkdir helloworld_1.0-1

Next, put the different files and folders of your program in this folder. Here are some sample files and folders that we are adding to our new folder. Instead, you must put your own files and folders.

$ mkdir helloworld_1.0-1

/usr $ mkdir helloworld_1.0-1/usr

/local $ mkdir helloworld_1.0-1/usr/local/bin $ cp “~

/Projects/Hello World

/helloworld” helloworld_1.0-1/usr/local/bin

Create metadata

Next, we create special metadata files that the package manager will use to install your program on the client system.

$ mkdir helloworld_1.0-1

/DEBIAN $ gedit helloworld_1.0-1/DEBIAN/control

The metadata file, as its name implies, describes the package in detail. This is an example of sample entries that you can add to your metadata file.

Package: helloworld Version: 1.0-1

Tranche: Base Priority: Optional Architecture: i386 Depends

: libalgoor rather (>= 1.2.13), other Dependency (>= 1.2.6)

Maintainer: Your name Description:

Hello World When you need a little sun, run this little program!

In the above metadata file,

  • Package: Specifies the name of the package
  • Version – stately + minor version
  • Section: Specifies the application area in which the deb package is classified. Deb Archive maintainers have categorized the software into various sections like games, electronics, java, etc. We need to specify the section applicable to our program. Here is more information about the sections.
  • Priority: Indicates the priority of the package for user installation. Note that this is a required field that can have the values ​​required, standard, important, and optional. Here ‘optional’ is the value of the priority field and does not mean that it is optional.
  • Architecture: Supported operating system architecture for this program
  • Depends – Dependencies
  • Maintainer: Email and name of the developer/organization that maintains this package
  • Description – Brief description of the package so that others can easily understand what it is and what it does. It is important to add a space before each line in the description.

These are not all the fields available for the metadata file. Here is the exhaustive list of fields that can be included in the deb package metadata file.

Create debut package

Let’s say the current directory is the one that contains the helloworld_1.0-1 program folder, then run the following command to build the package from its folder.

$ dpkg-deb –build helloworld_1.0-1

Final words: How to Build Deb Package in Ubuntu/Debian Linux

I hope you understand this article, How to Build Deb Package in Ubuntu/Debian Linux. If your answer is no, you can ask anything via the contact forum section related to this article. And if your answer is yes, please share this article with your friends and family to give us your support.

James Hogan
James Hogan
James Hogan is a senior staff writer at Bollyinside, where he has been covering various topics, including laptops, gaming gear, keyboards, storage, and more. During that period, they evaluated hundreds of laptops and thousands of accessories and built a collection of entirely too many mechanical keyboards for their own use.


Must Read

- Advertisment -