08. Converting between package formats alien

There are times you need to convert among tarbells, .rpm, and .deb. Not all software and packages are available on both platforms, so this is not uncommon. The command line tool that gets this done is the alien.

Requirements

The alien program requires that you have both RPM and Debian package manager to convert between formats. Thus, install both using the appropriate yum or apt-get commands.

# apt-get install alien
# yum install alien

Syntax

The syntax for alien is as follows:

$ alien [options] file[...]

Options

Here are some of the commonly used options with alien.

-d|--to-deb
Convert the specified package to Debian. This option is the default.
-r|--to-rpm
Convert to RPM.
--to-slp
Convert for Stampede Linux.
--
-t|--to-tgz
Convert to a Slackware tgz package.
-i|--install
Installs the converted package, then removes it.
-k|--keep-version
Keep the version number of the generated package.
-v|--verbose
Verbose mode: display each command.

Converting rpm to deb and vice versa

As mentioned above, converting to .deb files is the default option.

# Converting to .deb
# alien packagename.rpm # Converting to rpm
# alien -r packagename.deb

Take your Linux skills to the next level!

Linux for Beginners

Take your Linux skills to the next level! Try Linux & UNIX

Linux for Beginners doesn't make any assumptions about your background or knowledge of Linux. You need no prior knowledge to benefit from this book. You will be guided step by step using a logical and systematic approach. As new concepts, commands, or jargon are encountered they are explained in plain language, making it easy for anyone to understand.

$ Check price
24.9924.99Amazon 4.5 logo(101+ reviews)

More Linux & UNIX resources

Want to avoid becoming a code monkey?

Pragmatic Thinking

Want to avoid becoming a code monkey? Try Good Practice

Programmers have to constantly learn new concepts and technologies. In this book by Andy Hunt, you'll learn how our brains are wired, and how to take advantage of your brain's architecture to make the most of your learning. You'll learn new tricks and tips to learn more, faster, and retain more of what you learn.

$ Check price
34.9534.95Amazon 4.5 logo(86+ reviews)

More Good Practice resources

Ad