Linux package extensions

One of the issues that continue to cause problems for newcomers to Linux or users with less knowledge is the installation of packages or how to install programs in Linux. This has been partly solved with tools like YaST, Software Centre, Pi Store, and other programs to automate Linux installations similar Gdebi, Synaptic, etc.

But when we download software packages that are not in the repositories of our distribution or we desire to install programs in Linux with a different version than the one provided by the sources of our distro, things get more than complicated. Especially when the downloaded packages are tarballs with source code.

In Windows, with Windows Installer everything is much easier, also there are no too many extensions binaries to install (.exe, .bat, .msu). Those who come from the Apple platform volition besides have noticed that the Mac OS X .dmg has too many extensions.

Some other lurid topic in Linux (and other * nix) are dependencies, that is, packages that depend on other packages and if the latter are non installed we will not be able to install the first one. In this example, at that place are a multitude of package managers that make life easier and automatically resolve dependencies. Otherwise we would have to solve them ourselves manually.

Related commodity:

How to know my IP in Linux

With these tutorial I intend that all this is something more trivial for you and does not pose a problem when installing programs in Linux. In the following lines we are going to describe all the near pop extensions and types of packages that exist in the Linux globe and the procedure to install them in a elementary way.

deb vs rpm Tux: And which one do you prefer?

Table of Contents

  • ane .Deb and .rpm packages:
    • 1.1 RPM:
    • 1.two DEB:
  • 2 Other package managers on your distro:
  • 3 How to install tarballs:
    • 3.1 Install tar.gz or tgz:
    • three.2 Tar.bz2 or .tbz2:
    • 3.3 Other Tape Archive:
    • three.4 Tar.xz or .xz or .txz:
    • 3.5 .gz or .gzip or .bzip2:
    • three.6 .tar.lzma, .tlz:
  • 4 How to install binary packages:
    • 4.one .jar:
    • iv.2 .bin:
    • 4.3 .run:
  • 5 How to install scripts:
    • 5.1 .sh:
    • five.2 .py:
  • 6 Others:

.Deb and .rpm packages:

Linux is divided into two great worlds and packages stand for it very well DEB and RPM. The first is used by Debian and derivatives like Ubuntu, while the second is used by SuSE, Fedora, and others.

RPM:

If you are in Novell SuSE or in openSuSE, you can use YaST to install packages of this type. To do this, y'all just have to go to the SuSE menu, click on "System", "YaST" and then get to the option "Install / uninstall software". And then we can install programs in Linux from the DVD of your distro or from the network.

If we already have the package downloaded, we can correct-click on information technology and it will give usa the selection to Install. Very like shooting fish in a barrel…

Related article:

Unzip RAR on Linux

If nosotros want to do information technology from the console instead of YaST uses Zypper:

zypper install nombre_programa

In Red Hat more of the aforementioned ... On the other hand, if you have Fedora or CentOS, you lot can use YUM. Allow's go outset with YUM, that from the directory where the package is located, in the terminal you must write:

yum install nombre_paquete

And if there is a mutual tool to install RPM Information technology is the rpm itself present in many distributions that are based on this type of parcel:

rpm –i nombre_paquete.rpm

In Mandriva you tin can use the Mandriva Control Heart to install programs or RPMDrake. You lot can besides utilise in text manner

urpm:

urpm –i nombre_paquete.rpm

DEB:

In Ubuntu, you lot can use the simple Ubuntu Software Center to install packages from the official repositories. From Debian it tin can as well exist installed with gdebi-gtk, graphically and easily or with Synaptic, these too work on other distros, you but have to install them.

Another interesting tool is Dselect, also in graphic mode to handle packages easily. Merely for those who pull the console more, you can apply dpkg or apt (remember to prefix sudo or piece of work with root privileges):

Dpkg –i nombre_paquete.deb

o

Apt-get install nombre_paquete

Aptitude is another fairly complete tool that y'all can apply by typing the following:

aptitude install nombre_paquete

Other bundle managers on your distro:

Arch Linux and derivatives apply a package manager named pacman. Information technology was created by Judd Vinet and is capable of automatically resolving dependencies. To install a package with this manager:

pacman –S nombre_paquete

Portage is another of the smashing package managers for instance Gentoo. Information technology has similarities to BSD Ports and is compatible with POSIX and the python environs. It is also used by FreeBSD. To install a package with it:

emerge nombre_paquete

paldo It is a Linux kernel operating system that uses an upkg package manager. It was created by Jürg Billeter and to install programs in Linux with him you must write:

upkg-install nombre_paquete

The Pardus Linux distro uses a uncomplicated packet manager written in Python and known as PiSi. Information technology uses LZMA and XZ to compress the packets and especially the Delta technology is hit, which allows downloading but the differences between the packets to save bandwidth. Install like this:

pisi install nombre_paquete

Tar Tux box

How to install tarballs:

Packages that are installed directly from source are packaged with the primitive, simply nonetheless useful and efficient, Tar tool (hence the name tarball) and are then compressed using some kind of compressed format.

Some packages of this blazon come with files inside such as .jar, .bin, .rpm, ..., in that case yous just take to unpack and use the correct process for the binary it contains. But usually information technology is source code to be compiled and installed.

Let'due south see how. The beginning thing, when we work from the console, is to identify ourselves in the directory where the parcel we want to work with is located. For this we use the tool "cd". For example, if yous take downloaded a package and you have it in the Downloads folder, type in the terminal:

cd Descargas

And the prompt it will change with that path to indicate that you are inside this system directory. Y'all should also think that you need privileges to execute sure actions similar ./configure, make, or make install… which we will encounter adjacent.

Install tar.gz or tgz:

These types of tarball are widely used in Slackware and derivatives, although information technology has been extended to package lawmaking for the rest of the distributions. Installing tar.gz is like this (remember to run ./configure, make and make install with privileges, you lot know, every bit root or by prepending sudo to the control ...):

cd directorio_donde_se_encuentra_el_tarball tar –zxvf nombre_paquete.tar.gz (o nombre_paquete.tgz, en caso de ser un .tgz) cd nombre_paquete_desempaquetado ./configure make make install

If this didn't work To install tar.gz, you tin can admission the unpacked directory to check if there is a text file with the instructions to install it. Sometimes, when they do not follow this standard process, developers include these types of files to explicate the particularities, dependencies, etc.

Tar.bz2 or .tbz2:

It is a very used package in BSD and that has also spread to Linux and other * nix. It is packaged with tar and compressed using BSD Nada 2. The procedure to install this type of plan is:

cd directorio_donde_se_encuentra_el_paquete tar –jxvf nombre_paquete.tar.bz2 (o nombre_paquete.tbz2, east incluso nombre_paquete.tbz) cd nombre_directorio_desempaquetdo ./configure make make install

This should suffice to install programs on Linux. Make sure you apply privileges for the latest commands.

Other Record Archive:

Sometimes a tape archive or uncompressed tar file. This type of parcel maintains the information necessary to fully restore the files it contains and to unpack it, y'all just accept to do this:

tar xvf nombre_paquete.tar

Then expect for a file with name README.txt (or similar) inside the unpacked directory and look for the installation instructions. Normally information technology is almost doing a procedure similar to the previous ones ...

Tar.xz or .xz or .txz:

Lately I'thousand seeing more of this guy. To operate with this blazon of package you must have the tool xz-utils installed. To unpack and install them, use:

tar Jxvf nombre_paquete.tar.xz

o

Xz –d nombre_paquete.tar.xz Tar –xf nombre_paquete.tar

o

Unxz nombre_paquete.xz

And once unzipped, a file is searched README.txt or INSTALL.txt to see the details of the installation, which is usually typical ./configure, make, and make install. Although sometimes cmake can be used.

.gz or .gzip or .bzip2:

With GNU Zip packages of type .gz or .gzip tin can be compressed. These are treated similarly to BSD Zip ii compressed packages with .bzip2 extension. To bargain with this type of packages, we must take the unzip and bunzip2 tools available in our organization:

gunzip –c nombre_paquete.gz bunzip2 nombre_papuete.bz2

The rest is similar to the steps seen with the previous tarballs ... Brand sure yous come across the README or INSTALL files nowadays.

.tar.lzma, .tlz:

Whether it appears by its long proper name, .tar.lzma, or if information technology appears by its short name .tlz, these packages use the Lempel-Ziv-Markov pinch algorithm and to extract and install them, you must type in the console (previously you lot need take the lzma package installed):

unlzma nombre_fichero.lzma

o

lzma -d file.lzma

o

tar --lzma -xvf file.tlz

o

tar --lzma -xvf file.tar.lzma

Depending on the format in which the package is presented to us. Then you can look at some text file inside with instructions or follow the steps we have described to install the other tarballs (./config, make, make install). Another good exercise is to await at the developer's website, where there are tutorials on how to install the packages or there are Wiki sites with lots of information.

* Note: you can besides install certain packages packaged with a tool called installpkg.

How to install binary packages:

.jar:

To install coffee packages information technology'due south pretty straightforward. The requirements are obvious, to take the Oracle Java virtual machine installed (either the JRE or JDK). To install it we must click with the right mouse button on it and select "Open with another application"From the drib-down carte. A window will appear with a list of applications in our system and a form line below to write one. Well, in that infinite you write "java –jar "Without quotes, including the space afterwards jar that I accept left. So you click on the button "Open up"And information technology should run without a problem. As you lot can see, it is not necessary to install it.

.bin:

Nosotros can execute them by double clicking on them to open up them, if we take previously given it execution permissions. To do this, click with the right mouse button on the file and so go to "Properties"To assign execution permissions in the tab«Alibi mesouth ». It can likewise exist installed from the console past doing the following:

cd directorio_donde_está_el_binario ./nombre_binario.bin

.run:

For .run we will keep in a like way to the .bin. This format is widely used for drivers, such as the AMD Goad Center. To install it you can utilise the panel:

cd directorio_donde_está_el_paquete sh ./nombre_paquete.run

Remember to assign execution permissions beforehand. Also, some need to be run with privileges, in which case practise it as root or with sudo.

If you want to install the .run in graphics mode, y'all can right-click on it and select "Properties", And then in the tab"Permissions"Brands"Allow to run the file every bit a program"And y'all accept to close. At present when you double click on the .run yous will come across that an installer very like to the ones in Windows opens (type Next, Side by side, OK…).

Install programs in linux

How to install scripts:

.sh:

In Linux we can also find scripts with .sh or .py extensions. To install this type of scripts nosotros will go to the directory where the script is found with the control "cd" as we accept seen previously. Eye! If the script is packaged, start unpack or unzip it. And then, you can give information technology execution permissions equally you already know (you tin practise it in graphical style or from the final with the command "chmod + x script_name" without quotation marks). Once they have execution permissions, from the concluding:

sh nombre_script.sh

o

./nombre_script.sh

.py:

For files with extension .py the Python programming language interpreter must be chosen. To do this, type in the panel this:

python nombre_script.py install

Others:

There are other types of files and packages to install programs in Linux. Certain packages from BSD, Solaris, Mac Bone X, and other * nix can be installed on Linux. An example of this are the Solaris .pkg. To install the .pkg yous can click on them with the right mouse button, go to "Backdrop"And"Permissions"And assign execute permissions to information technology. Then you double click on them to install them.

There are too tools like Alien to convert from ane format to another, for case from rpm to deb, etc. This is not highly recommended and can sometimes cause issues. So I do not recommend it.

Continuing with the Linux package gibberish, to say that there are more than than those seen hither, but they are more rare and unusual. An instance of rarity is the .slp they use from the Stampede Linux project. To transform .slp into other more everyday formats you tin utilise Alien (previously installed Alien) similar this:

sudo conflicting nombre_paquete.slp nombre_paquete.extensión_nueva generated

Eastward.g., to transform from .slp to rpm:

sudo alien miprograma.slp miprograma.rpm generated

Y'all can leave your comments with requests, doubts or comments. If you have whatever problems following the steps in this tutorial, I volition be happy to assistance you.