Launch deb file. dpkg -l mask. Running executable files and scripts

And also other systems have to be installed additional programs. In operating rooms Windows systems everything is very simple, as a rule, there is an installer setup.exe that helps install the software. But in Linux things are a little different. How to install programs on Linux? Now let's look at this question.

Linux has several types of installation packages and each distribution has its own package format. Fedora, Mandriva, Red Hat and Suse distributions use standard installation for Linux RPM, developed by by Red Hat. The RPM package file is typically named program_name-version.rpm.

Another one of the very popular formats this is DEB. Used in Debian, Ubuntu, Knoppix and Mepis. Has a name program_name-version.deb.

And we approached the archives. Typically these are .tar , .tar.gz , .tgz extensions. They should be unpacked and then installed/compiled.

You need to perform the program installation procedure as a superuser.

Quick navigation

Installing programs on Debian, Ubuntu

There are many tools for working with DEB packages, but the most commonly used is apt-get, it is included in standard set tools. To install the application, enter the command:

apt-get install package_name

For removing:

apt-get remove package_name

APT stores local database details of all packages available for installation and links to where to get them. This database needs to be updated from time to time with the command:

apt-get update

To update outdated packages (programs) on the computer, type the following commands:

apt-get update ; apt-get upgrade

Installing programs on Fedora, Red Hat

A utility similar to APT is yum. To download and install the package from the configured repository, write the command:

yum install package_name

yum remove package_name

The local yum database is not saved, so there is no need to update. To install updates, use the command:

yum update

Select something specific to update:

yum update package_name

Installing programs in Mandriva

Mandriva has its own set of tools for working with packages, called urpmi. For installation:

urpmi package_name

To delete:

urpme package_name

Update the local database with the list of packages:

urpmi. update -a

To install updates:

urpmi --auto-select

Installing programs from archives (tarballs)

For archives compressed using GZIP (gz, gz2, etc.) we do this:

tar -xvz f filename

For archives compressed using BZIP (bz, bz2, etc.) it’s a little different:

tar -xvjf filename

Tar commands:

  • x – extract files from the archive;
  • v – detailed display of information on the screen;
  • f – Required option. If not specified, Tar will try to use tape instead of file;
  • z – process archive compressed using gzip;
  • j – process an archive compressed using bzip.

After executing the command, a folder will be created with a name similar to the name of the package. Then you need to open this created folder with the command:

cd folder_name

Next, in the unpacked archive, read the instructions in the README file, if any. In any case, if the program is compiled as an executable file, then the package will contain a .sh file, usually called install.sh. We simply launch it for execution.

But if the program is presented in source code, we execute the commands:

./configure
make
make install

After installation we perform:

make clean

Well, that's all, nothing complicated. Now you know how to install programs on Linux: Debian, Ubuntu, Fedora, Red Hat, Mandriva, including from archives.

In this article I will show you how to install the program on Linux Mint. The article will discuss several methods, each method has its own advantages and disadvantages and can be used in various situations.

Installing programs in Linux Mint with Software Manager

The easiest way to find and install programs in Mint is through the Software Manager. It offers neat and user-friendly interface to search and install programs. Programs are organized into "repositories," and if the program you want isn't in the repositories supported by Software Manager, you'll have to find alternative ways to find it.

To get started, take a look at home page programs - you may be offered a convenient downloadable installer in the form of a Deb package here - choose a 32-bit or 64-bit download (if offered) to match the version of Ubuntu you have installed. Once you've downloaded it, go to your Downloads folder, double-click the file, and follow the instructions to install it.

How to install a program on Linux Mint via terminal

Other programs may require installation via a terminal. Typically this will involve you first adding the software repositories using the following command:

sudo addaptrepository ppa:user/ppaname

ppa: stands for Personal Package Archive - a special software repository, usually centered on Ubuntu, that anyone, usually the program's development team, can create for download source packages for download.

Replace ppa:user/ppa-name with the PPA provided by the software manufacturer.

You will then be able to install packages from the repository, via the Software Manager, or - since you're already in a terminal - using the following command:

sudo aptget update && sudo aptget install "program"

Replace “program” with the name of the program you need, and it will be downloaded and installed.

Once added, you can view and manage repositories via System Settings > Software Sources

Updating programs installed on Linux Mint

Programs that you install through repositories - through the terminal or Software Manager - are checked for updates quite regularly, namely within 10 minutes after the first download and then every two hours. This is common enough for most, but you can also check manually using one of two methods.

The first is for Cinnamon: open Menu > Administration > Update Manage, click Refresh to check manually, and select the Edit > Preferences > Auto-Refresh tab. to change the time between checks for updates (days, hours and minutes are supported).

To check for updates via terminal, enter:

sudo apt-get update

The versions of applications in the Software Center may not be as new as those offered on the programs site - by adding the appropriate repositories, you can ensure that the installation itself latest version program and gain access to the beta version and other pre-release versions.

By the way, if you don’t yet know how to store passwords, then in the article “”, we told you how to do it correctly.

Now you know how to install the program on Linux Mint. Good luck to everyone and happy holidays!

Installing programs via Synaptic.

In this article we will look at the principle of installing programs and their sources, and also get acquainted with the Synaptic package manager. We learn what repositories are, how to download programs and more.

General principle of installing applications in Ubuntu

By installing Ubuntu on your computer, you will have at your disposal a set of programs for work, entertainment and Internet surfing. This is an office suite OpenOffice programs, mail client, exchange client quick messages, audio and video players, disc burning software and much, much more. But what we are offered is an alternative to what we are used to. Of course, some people don’t care what programs they use, but they would still like to have something with familiar functionality and interface. You can try to install Windows programs from under Wine, but this is not the same, and what is the point of switching to Linux then?

Let's start with the fact that there are a number of cross-platform programs, i.e. programs that are developed for different operating systems. A striking example of this Firefox web browser. By the way, it is installed by default along with Ubuntu, and, unlike windows versions has a more pleasing font. The only major difference is the location of the “Settings” item in the “Edit” tab, and not in the “Tools” tab. Why this was done is unclear.

Well, okay, I got distracted. So, let's start installing programs. All programs are downloaded from the Internet or taken from installation disk. Programs in Linux, Debian branches, which includes Ubuntu, are stored in the form of deb packages. On the Internet you can take it from official repositories (ports). But first things first.

All programs from deb packages are installed using the APT program, which has a number of parameters and graphical add-ons. You can use the installation via the console terminal. Don’t be scared, the console is not difficult, and even convenient if you know exactly the name of the program you want to install.

Linux must know where to get programs from, i.e. have a list of available repositories. The list can be edited using graphical utility Synaptic.

Let's go System > Options > Administration > Package ManagerSynaptic.

Since installing programs is an administratively privileged action, Ubuntu will ask for your password for security reasons. Without your password, no one will be able to remove/install programs or screw up configuration files. After opening Synaptic, follow to Settings > Repositories

We see a list of repositories that can be enabled/disabled. You can also select a disk with Ubuntu as the application source (this can be useful if there is no Internet connection or you want to update the distribution from the disk to a newer version). In the “Other Software” tab you can add your own third party repositories, i.e. those sources of applications that are not official, but may contain the programs you need and updates for them. I think there will be no issues with the “Update” tab. The only thing I want to note here is the “Release Updates” item. When released a new version Ubuntu, the update manager will prompt you to update your software if you select “Long-term support releases” or “Regular releases”. If you don't update, you won't be able to get updates from the official repositories maintained by Canonical, which is the lion's share of all Ubuntu software. The difference between regular and long-term support releases is as follows:

Regular: within 2-3 years

With long-term support: 3 years for workstations and 5 years for servers.

Naturally, all updates are free.

You can add any other repositories at your discretion, for example, if you want to install a program that is not in the official repositories or the main repositories are temporarily unavailable. I recommend paying attention to the mirror mirror.yandex.ru

Once you have updated the list of repositories, you need to let Linux know what exactly they contain. To do this, you need to click the “Update list” button in Synaptic (at this moment, xml list files with installation packages and their descriptions will be downloaded from the specified repositories).

The “Authentication” tab contains a list of keys ( digital signatures) deb package providers. If a particular key is missing, the repository is considered untrusted, and Ubuntu will refuse to accept from it deb packages.

In Synaptic, packages are divided into groups by category. If you do not know the name of the program you need, you can find it in the category by description. Check the box for installation and click “Apply”. If the operation of the program you have chosen depends on another package, then Synaptic will offer to download and install the one you need. It is called addiction. After you have installed the desired program, then most likely you will find a link to it in the Gnome menu. The exception is complete absence at the program GUI.

In this article we looked at the installation from graphical shell. In the next article I will talk about installing programs from the console. You will also find out where the list of repositories is stored, where deb packages are downloaded and where programs are installed.

Windows users switching to Linux, already have some knowledge and computer skills, some of which become useless in Linux due to significant differences between systems. Linux is a more flexible system in which you can achieve what you want in several ways. This also applies to installing programs. If Windows users If you are accustomed to the fact that to install a program you need to run the installer program, which is usually called Setup.exe or Install.exe, then in Linux this can be done different ways. However, we recommend installing programs from official repositories, and using other options only in cases where there is a clear understanding of how and why this is done.

Repository is an archive of programs located on the Internet or in local network. Installation of programs from this archive is done using special utilities, which we will look at below. Repositories popular distributions contain great amount programs for every taste. For example, repository stable version Debian contains over 37,500 packages.

Plastic bag is a set of files (executable files, source code, data) intended for installing programs. Packages also contain some service information, for example, version number and so-called dependencies.

Dependencies indicate which third party packages (i.e. programs, libraries, data) are needed for normal operation this application. If required packages are missing on your computer, they will be installed automatically. Thus, the user does not need to monitor the installation of all the necessary libraries, data necessary for the operation of a particular software. For this purpose they are used special programs - package managers.

Another advantage of using official repositories is that all packages are carefully checked before inclusion in the repository and, in most cases, distributed along with open source code, which guarantees the functionality of the program and virtually eliminates the presence of malicious code. But when installing programs from unofficial sources need to be careful.

To install programs from repositories, various package managers are used, which can have both a graphical and text-based interface.

Installing programs on Ubuntu using the GUI

Let's start with standard manager The most popular Linux distribution today is Ubuntu. It is called " Center Ubuntu applications " To call this program, you need to click on the corresponding icon on the launcher.

Rice. 1. Ubuntu Application Center Icon

If the icon is not there, you need to open the Main Menu (Dash) and type the first letters of the program name.

Rice. 2. Ubuntu Application Center

At the top of the program window you can select:

  • « All applications» to view and install new programs
  • « Installed" to view installed applications and removing them if necessary
  • « Story» to view the log of work with the program.

On the right top corner window there is a search bar where you can enter keywords describing the desired program. On the left is a list of program categories. In the center of the window there is a list of programs. By clicking on the icon or name of the program, we will see it detailed description, screenshots and user reviews. To install the program, click the " Install" (or " Buy"if the application is paid). Before installation, the system will ask for a superuser password, after which you will have to wait a while for the program to download and install. Removing programs is done in the same way. At the top of the window, click on the button “ Installed", select the program that you want to remove, then press the button " Delete».

The Ubuntu Application Center can also be used to install packages that have been downloaded from the Internet. On Ubuntu they have the extension .deb. To install programs in this way, just click on the program distribution package (file.deb), the control center will open, after which you need to click the “ Install" In this case, the program distribution must be created for the specific version you have installed operating system, otherwise dependency problems may arise and the program will not install. In addition, when downloading programs from dubious sources, there is a possibility that they contain malicious code, therefore, we repeat the recommendation to install programs from official distributions. There are other graphical package managers for various systems on Linux based(Synaptic, KPackage, etc.). Within the framework of this article, we will not be able to consider them in detail, however, they have similar functionality and interface, therefore, when installing programs using the graphical interface special problems should not arise.

Installing programs in command line mode

Various package managers are used to install and remove programs using the command line. The graphic managers discussed above are just add-ons over them. The same actions can be performed in command line mode. To work with command line you need to open a terminal or console. For a more detailed description of working with the command line, see the article Linux Commands. A number of commands discussed below must be executed in superuser mode. To switch to superuser mode, you need to enter the su command, or before each command that requires root rights, enter sudo. On Debian based systems (Ubuntu, Kubuntu, Linux Mint, Xubuntu, Damn Small Linux, etc.) a manager is used to manage .deb packages apt-get, utility dpkg and shell aptitude, which has a text interface.

Installing a program from the repository

Before installing programs, you need to update the versions installed programs and libraries by executing the following commands:

sudo apt-get update

sudo apt-get upgrade

Then we install required package command:

sudo apt-get install package

Where paket is the name of the package, for example the command

sudo apt-get install mc

will install the mc package, that is, Midnight Commander.

To remove the paket package, you need to run the command:

sudo apt-get remove package

You can install or remove several programs at the same time, for example, the command:

sudo apt-get install php5 mysql-server apache2 phpmyadmin

will install the basic set of programs necessary for the operation of the web server.

Search programs:

sudo apt-cache search keyword

Search by keyword“keyword” is used both in the name and in the description of the programs.

You can also use the aptitude program to work with packages. The syntax for installing and removing packages is the same as apt-get:

sudo aptitude install package

sudo aptitude remove package

Team aptitude without parameters will call the package management text shell.

Installing the program directly from the distribution kit (file.deb)

sudo dpkg -i paket.deb

View package list:

dpkg -l mask

For example, the command

dpkg -l apache2- will show whether the apache2 package is installed.

dpkg -l | grep apache2- will show all packages that have the combination of letters “apache2” in their name.

dpkg -L apache2- will show all files that belong to the apache2 package.

sudo dpkg -r package- removing package package.

Installing programs on systems with RPM

These are systems based on Red Hat Linux, hence the name RPM - Red Hat Package Manager. Accordingly, packages have the extension .rpm. The most popular systems that use RPM are openSUSE, Mageia, Fedora, CentOS, Red Hat Enterprise Linux, ALT Linux, ASP Linux. As package manager these systems typically use the utility yum.

To update packages you need to run the command:

yum update

To install the paket program from the repository, use the command:

yum install package

To remove, respectively:

yum remove package

Search for a program using the keyword “keyword”:

yum search keyword

Running executable files and scripts

Sometimes programs for Linux are supplied as a ready-made executable file in binary form, or in the form of a program in any scripting language (bash, Python, Perl, PHP, etc.). Typically, the file type can be determined by its extension: .bin - binary executable file, .sh - Bourne shell or bash script. .py - program in Python language, .pl - Perl script. Some executable files have the extension .run. But in Linux usage extensions executable files is optional. If the file is a script, then the program for executing it is usually indicated in the first line. For example, if the line looks like #!/usr/bin/perl, then this is a Perl script, and if #!/usr/bin/env bash, then this is bash script. You can view the file using the command less file. To run a program, you need to give it execution rights; this is done using the command:

sudo chmod +x file.sh

After this command, file.sh will become executable. However, if you then simply type file.sh in the terminal, it will not start execution. To run programs, they must be located only in the directories specified in the $PATH variable, or programs must be launched specifying the path to the file. The simplest way do this while in the directory with the file - type a dot and a slash before the file name. That is, to run file.sh you need to type:

./file.sh

Scenarios on scripting languages you can not give execution rights (chmod +x), you can determine the file type as indicated above and launch the corresponding interpreter specifying the executable file. For example:

sh file.sh

python file.py

Do not forget that to run the program, the appropriate programming language must be installed, in the latter case Python.

Compiling programs

Most Linux programs are open source, meaning they are distributed along with the source code. This allows a wide range of programmers to participate in development, correct errors, modify programs, check them for malicious code and bookmarks, transfer programs to other platforms, etc. In addition, during compilation, you can optimize the operation of programs, for example, the speed of their execution. On the other hand, compiling programs is the most complex look their installations. It is up to the user to track dependencies and handle errors that may occur during compilation. Source usually comes in the form tar archives, compressed by archivers gzip: tar.gz, tgz, bzip2: tar.bz2

First you need to unpack the source code file by running the command:

tar -xvf program.tar

If the file is compressed, the archiver type will be recognized automatically, so you don’t have to specify it as a key. The source code will be unpacked into the directory corresponding to the file name, in in this case program. Go to the directory with the source code:

cd program

If there are README or INSTALL files in the folder you need to read them, it usually contains important information installation instructions and a list of required libraries that should be installed before compilation. You can view the list of files using the command ls, and view the README file using the command less README.

Most often compilation is done using following commands: ./configure

configure is a script that checks if all the programs and libraries needed to compile are present and prepares for the main process. If the script produces an error, you will need to install the appropriate programs and libraries. If there are no errors, we compile directly with the command:

If everything went well, then to install the compiled program you will need to run the command:

make install

If the installation is carried out in system directories, you need root rights or the sudo command:

sudo make install

After installation, you can remove unnecessary temporary files command:

sudo make clean

Uninstalling a program that is installed in this way is usually done using the command:

sudo make uninstall

Let us mention one more way to install programs, specifically games.

IN Lately manufacturers computer games began to pay more attention to Linux, thanks to which, for example, a platform such as Steam appeared. But this is a topic for a separate article.

In the article, we have already touched on ways to install software on Linux. We remind you that the principle of installing software in Linux is somewhat different from installing software in Windows.

Installing from the repository is the easiest way and requires the least amount of effort. It does happen, however, that a program does not have a repository at all. It is not in the operating system repository, or there outdated version. Let's look at other installation methods.

deb packages

Files .deb these are installation packages of the Debian project, now very successfully used in many Linux distributions. To install such a package, you need to download it from the network or get it on some kind of media (CD, DVD, flash drive).

Then run the following command in the terminal: sudo dpkg -i [filepath/filename.deb] , the system will ask for the super user password and begin the installation.

For example, I downloaded Teamviewer from the official website and want to install it on the system. In my case the command would look like this:

Sudo dpkg -i /home/test/Downloads/teamviewer_10.0.37742_i386.deb

Please note Linux terminal take it calmly Cyrillic characters, so the path must be written as it is.

In principle, you don’t have to write the entire path to the file in one command, but first go to the directory where the file is located

Cd /home/test/Downloads

and then install the program

Sudo dpkg -i teamviewer_10.0.37742_i386.deb

sh installer

This method is somewhat similar to installing programs in Windows. At least here you will see the installation wizard too. True, to do this you need to launch it through the same terminal.

For example, I downloaded NetBeans and want to install it on my system. In this case, there will be several steps, so it would be wiser to immediately go to the directory with the file.

Cd /home/test/Downloads

Then we give the file permission to install

Chmod +x netbeans-8.0.2-linux.sh

Then install the file

Sudo ./netbeans-8.0.2-linux.sh

In case of .sh There are other commands in the files. For example, I could install NetBeans with the command

Sh netbeans-8.0.2-linux.sh

Bash netbeans-8.0.2-linux.sh

Self-extracting tar.gz archives

Such programs do not require installation at all; you just need to unpack them anywhere on your computer. The generally accepted directory is /opt.

Here we can draw an analogy with self-extracting archives in Windows. Quite a few programs in Windows have so-called Portable versions. It's about the same here.

RPM packages

The installation procedure is generally similar to deb packages. RPM packages are used in the distributions of Red Hat, Fedora, openSUSE, CentOS and others.

Let's continue our example with Teamviewer. To install an RPM package I need to tell the file with the extension .rpm from the program website, then run the following command in the terminal:

Sudo rpm -i /home/test/Downloads/teamviewer_10.0.37742.i686.rpm

Or, by first going to the directory,

Cd /home/test/Downloads

enter the command

Sudo rpm -i teamviewer_10.0.37742.i686.rpm

Installation from source

It is better to resort to this method only if there are no other options. It consists of compiling (assembling) a program from source codes.

In general, compilation in general view represents the execution of commands ./configure,make And sudo make install and is worthy of a separate article, in which we will compile some program as an example.

As you can see, all installation methods except the last one are not particularly difficult. This article did not touch upon such a very simple installation method as installation through the Program Manager, in which the entire installation is reduced to pressing one button.

I wish you success! And remember, a day without Linux is a day wasted. 🙂