
Then copy the executable file in there: cp ~/YourProjects/Hello/hello hello_1.0-1_arm64/usr/local/bin The -p flag to the mkdir command will create nested directories.

For example, suppose you want your program to be installed to /usr/local/bin: mkdir -p hello_1.0-1_arm64/usr/local/bin Put your program files where they should be installed to on the target system. Follow the same naming convention we have seen before. Create the working directoryĬreate a temporary working directory to make your package in. Make sure you have the dpkg-deb program installed in your system: this will be used later on to generate the final archive. We are now ready to generate the package.

Your deb file name would look something like hello_1.0-1_b.

Internally, a deb package contains a collection of folders that mimics a typical Linux file system, such as /usr, /usr/bin, /opt and so on. The most important one is the control file, which stores the information about the deb package and the program it installs. Anatomy of a deb packageĪ deb is a standard Unix ar archive that contains your application and other utility files. Let's start off with a bit of theoretical background. In this quick tutorial I want to show you how to generate a deb package from scratch that will install a binary executable in the target system. Deb files are handy when your app needs to take care of additional dependencies, integrate itself with the desktop, run pre and post install scripts and so on. deb extension, it is used to easily distribute and install programs for Linux Debian and derivatives.

A deb file is an archive that contains data.
