Decode how the package manager works and software installation on Linux

Installing software on Linux is managed by the package manager (software managers) and software repositories. Unlike Windows, software does not download from websites and run .exe files. If you are new to Linux, you will feel a bit 'cultural shock.

Installing software on Linux is managed by package managers and software repositories.Unlike Windows, software does not download from websites and run .exe files.If you are new to Linux, you will feel a bit "cultural shock".

While you can compile and install everything on Linux, the package manager is designed to do all the work for you.Using the package manager makes it easier to install and update software on Windows.

Decode how the package manager works and software installation on Linux Picture 1Decode how the package manager works and software installation on Linux Picture 1

Compare Linux with Windows

There are many Linux distributions and package managers.Linux is built from open source software, which means that each Linux distribution compiles its own software with different library versions and compile options.Linux compiled applications often do not run on all distributions - cannot be installed due to different package formats.If you look for a Linux application site, you will see many download links for different Linux package formats and distributions.The application can tell you to download the source code and compile it yourself.

Decode how the package manager works and software installation on Linux Picture 2Decode how the package manager works and software installation on Linux Picture 2

Software store

Linux users often do not download and install applications from application sites like Windows users.Instead, each Linux distribution contains its own software repositories.Repositories contain specially compiled software packages for each distribution and Linux version.For example, if you are using Ubuntu 12.04, the repositories you use contain packages specifically compiled for Ubuntu 12.04.A Fedora user uses the repository to push packages compiled specifically for the Fedora version.

Decode how the package manager works and software installation on Linux Picture 3Decode how the package manager works and software installation on Linux Picture 3

Package manager

See the package manager as a mobile app store - except that it appeared long before the app store appeared.Using the package manager to install the software, it automatically downloads the appropriate package from the configured software repositories.Install and set up applications without having to click through the appropriate programs or find .exe files on websites.When an update is available, the package manager will notify and download the appropriate update.Unlike on Windows each application must have its own update to receive automatic updates, the package manager handles updates to all software installed from the software repositories.

Decode how the package manager works and software installation on Linux Picture 4Decode how the package manager works and software installation on Linux Picture 4

What is the package (package)?

Unlike on Windows, the installation files of the formatted application are .exe, Linux using special package formats.There are many types of packages - especially DEB on Debian and Ubuntu, RPM on Fedora, Red Hat and others.These packages contain archive files including a list of files.The package manager will open the archive file and install the files to the location specified by the package.The package manager still knows which package the file belongs to - when you uninstall a package, it knows exactly which file in the system belongs to.Windows has no idea what file of the application is installed - it allows application installers to manage the installation and removal themselves.

Packages can also contain scripts when packages are installed and removed, although they are often used to set up the system and do not arbitrarily move files to other locations.

Decode how the package manager works and software installation on Linux Picture 5Decode how the package manager works and software installation on Linux Picture 5

Install software on Linux

To install software on Linux, open the package manager, search for software and notify the package manager to install it.Your package manager will do the rest.Linux distributions often provide a lot of frontend programming for the package manager.For example, on Ubuntu, Ubuntu Software Center, Update Manager, Synaptic application, and apt-get commands use apt-get and dpkg to download and install DEB packages.You can use any utility you like - they only provide different interfaces.In general, you will find a simple graphics package manager in Linux distribution menus.

Decode how the package manager works and software installation on Linux Picture 6Decode how the package manager works and software installation on Linux Picture 6

Late update

One thing that new Linux users often pay attention to is package management and software repositories is often delayed in updating new software versions to their systems.For example, when a new version of Mozilla Firefox is released, Windows and Mac users will get it from Mozilla.On Linux, the Linux distribution must pack the new version and push it as an update.If you open the Firefox options window on Linux, you will notice that Firefox does not have the ability to automatically update (assuming you are using the Firefox version from the Linux distribution repository).

Decode how the package manager works and software installation on Linux Picture 7Decode how the package manager works and software installation on Linux Picture 7

You can also download and install the application yourself - for example, download Firefox directly from Mozilla - but this may require compiling and installing software from the source and you won't get the benefits from the browser. package management, such as automatic and centralized security updates.

While new versions of Firefox are preferred because they contain security updates, other applications may not be delivered as quickly.For example, a new version of LibreOffice's office suite may never be released as an update to your current Linux distribution.In order to avoid potential instability, this version may not be available until the official release of the next Linux distribution, for example Ubuntu 12.10, when it becomes the default version in its software repository. coordination.

To fix this problem, some Linux distributions, such as Arch Linux, provide "continuous release cycles" to the new version of the software that is pushed into the main software repositories.This may cause some problems.While you want new versions of desktop applications, you don't care about updating new versions of low-level system utilities, which can cause instability.

Ubuntu provides a backport repository touse newer versions of packages forolder distributions, although not all new versions include the backports repository.

Other warehouses

While Linux distributions come with its preconfigured repositories, you can also add other repositories to the system.Once the repository is available, you can install software repositories from that repository and receive updates using the package manager.The repository you added must be designed to be compatible with the Linux distribution package manager.

For example, Ubuntu provides a lot of PPA archives (Personal Package Archive), containing software compiled by individuals and groups.Ubuntu does not guarantee the stability or security of packages in these repositories, but you can add PPA repositories from trusted individuals to download packages that are not yet in Ubuntu's repositories - or download new versions. More of the existing packages.

Some third-party applications also use their own software repositories.For example, when you install Google Chrome on Ubuntu, it will add its own apt software store.This ensures you get Google Chrome updates through Ubuntu's Update Manager and standard software installation tools.

Decode how the package manager works and software installation on Linux Picture 8Decode how the package manager works and software installation on Linux Picture 8

5 ★ | 2 Vote