Convert between packages

alien is a program in Linux that converts between RPM packages, Debian packages, Stampede packages, and tarballs. This program is usually used when you want to use a package from another Linux distribution than the one you have installed on your system. You can then use alien to convert the package to your preferred package format and install it.

The syntax of the alien command is:

alien [options] file

The options define the output type. If no output type is specified, alien converts to deb format. Here is a list of the most common options:

  • -d, –to-deb – convert to Debian format
  • -r, –to-rpm – convert to rpm format
  • -t, –to-tgz – convert to tgz format
  • –to-slp – convert to slp format
  • -p, –to-pkg – convert to Solaris pkg format

For example, let’s say that you have an nmap RPM package, and you want to create a DEB package from it. You can use the following command:

linux alien convert to deb

You can then use the dpkg command to install the package.

If you have a Debian package and want to convert it to RPM, you can use the following command:

linux alien convert to rpm

You can then use the rpm command to install the package.

 

alien requires that you have appropriate package manager software installed – for example, to convert between rpm and deb file formats, you need to have both RPM package manager and Debian package manager installed.
Geek University 2022