Technology and General Blog

No matter if you are a Linux veteran or just setting up with Linux, you need to have applied apt-get or found it becoming utilized someplace. It is the main way to put in deals and dependencies on Ubuntu. In simpler terms, apt-get is the go-to of each individual Linux user when searching to established up software on their personal computer. This gives rise to a new concern – where by does apt-get put in these deals to? Where by do the files go, and how can one particular entry them? In this guideline, we will come across out the answers to these queries.

Ubuntu Filesystem Format

Right before we get into the technicalities of the make any difference, permit us start out by buying a primary knowing of the Filesystem Hierarchy Conventional, shortly known as FHS. All Linux distributions get their listing construction and contents from Filesystem Hierarchy Typical. We will briefly go around some areas that are crucial to knowing where apt-get install offers are and why so.

FHS is not thought of to be some authority on directory framework and contents for unquestionably each individual Linux distribution, but it is normally the most frequent conventional of file structure. All directories and documents in FHS seem below ‘/’ – the root directory. Let’s take a search at some frequently applied directories.

  • /bin listing holds the most important command binaries.
  • /dev listing consists of system documents.
  • /and so on directory has host-particular configuration documents.
  • /home folder is made up of the user’s individual options and saved data files.

A non-profit group regarded as Linux Foundation maintains the Filesystem Hierarchy Typical, and the last update (version 3.) was produced on June 3, 2015.

Now that we have gotten a better being familiar with of how the general Linux filesystem is structured and how it operates, we are ready to understand how apt-get tends to make use of this extremely construction to put in offers and dependencies.

Deal Administration

All working devices and Linux distributions appear with a package deal manager. These package administrators are responsible for installing and getting rid of program from the computer and sustaining them. They give the consumer far more regulate in excess of what form of systems they desire to operate on the technique and make their installation doable.

In Ubuntu (and Debian), dpkg is the package manager that most individuals use. You can take care of offers with .deb extensions as a result of dpkg. Talking about this utility is pertinent to our subject matter due to the fact we will be utilizing it to discover apt-get installs packages. “Aptitude” is the far more person-helpful way to use dpkg as it delivers a entrance-conclusion to the end users. Enable us seem at how dpkg operates in Ubuntu, its syntax, and how you can use it to obtain out wherever apt-get installs packages.

The typical syntax of this command is as follows.

Yet another frequent method of applying it is:

$ dpkg [options] filename

You can set up a offer on your Linux method by operating the subsequent uncomplicated dpkg command.

We will have an understanding of how just one can use dpkg and apt-get to install packages and find out where the deals are installed in the next sections.

How does apt-get operate?

By this issue, we all know that apt-get can be utilized to install, take away, and improve Linux packages. We also realized that it serves as the front-conclusion for dpkg, the indigenous package administration utility for Ubuntu and Debian. But how does it truly do the job? And what happens to the documents that are put in by it? Let us come across out!

Permit us commence by installing a test bundle known as ack. For this function, we will use apt-get, and afterwards we will trace the documents set up by it to their precise locations.

Go forward and begin a new Terminal window by means of the Things to do menu or urgent Ctrl + Alt + T on your keyboard. The up coming step is to make guaranteed you have the multiverse repository included. With out that, you are unable to set up ack. You are, of course, free to use any other package deal of your alternative.

So, to increase the repository, run the following command in the Terminal.

$ sudo apt-add-repository multiverse

The moment that is out of the way, we go on to putting in the offer.

$ sudo apt-get install ack

(Note that as an alternative of ack-grep, ack was put in. This is why we will be modifying the next commands we execute)

The installation will be complete inside a several seconds. Owning performed that, we now look into the deal with the support of our deal manager, dpkg. We will discover out where by the data files of the package were being put in and how to entry them.

Recall the standard syntax of the dpkg command that we described in the before sections. In this article, we will be making use of a variation of that command to list the information in the set up package deal.

To listing the contents of a package, we use the -L operator with the dpkg command. Operate the command presented below to see the data files.

As you can see in the image, all the deal supervisor put in documents are proven alongside with their addresses on the personal computer.

In addition to that, some data files are created or modified by pre/postrm and pre/postinstall scripts involved in the put in offer. You can perspective these scripts in the following directory.

Supplemental Facts

Now that we have included the meat of the tutorial, we will insert some more items of details for these that are curious about finding out additional.

Let us say, for instance, you want to use dpkg to extract all the data files of a offer in the latest directory. You can do this by jogging the following uncomplicated command.

You can also get a keep of the files this kind of as preinst, postrm, postinst, and far more by the command given below.

This will extract mentioned files into the latest directory as effectively.


With that remaining explained, we conclude this manual. We realized numerous items about apt-get today. We noticed the Filesystem Hierarchy Conventional, how the Ubuntu bundle supervisor will work, and finally, how we can uncover exactly where apt-get installs deals to.

Leave a Reply

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