Home / Linux / How to Install an RPM File in Linux

How to Install an RPM File in Linux

Fedora logo with the text "Install RPM Files in Fedora" over the default Fedora desktop.

Did you download an RPM file, and you’re not sure what it is or what do with it? It’s one of the file types used to install applications in Red Hat Enterprise Linux-based distributions, and we’ll show you how to use them.

What Is an RPM File?

RPM files end with the “.rpm” extension. RPM stands for Red Hat Package Management system, and it’s used to install applications in Red Hat Enterprise Linux-based distributions like RHEL, Fedora, and CentOS. It’s similar to the DEB package used to install apps on Debian-based distributions like Ubuntu and its derivatives like Pop!_OS, Linux Mint, and Zorin OS.

If you’re coming to Linux from Windows, you may be tempted to see RPM files as similar to EXE files, but this is not the case. RPM files contain the elements needed for installing an application, while EXE files are executable programs themselves.

While RPM files are meant for RHEL-based distros, it is technically possible to install RPM files on Ubuntu using an app called Alien.

RELATED: How to Install a DEB File in Linux

How to Install RPM Files

There are two ways to install RPM files on an RHEL-based distribution: using a GUI (Graphical User Interface) in the desktop and using the Terminal. Let’s go through both methods so that you can choose the one that’s best for you. Note that we’ll be using Fedora Linux in our screenshots.

Install RPM Files on the Desktop

Download the RPM package of the app you want to install. Let’s install Slack for this tutorial.

Download the slack RPM file

Double-click on the downloaded file to load its contents in the Fedora Software center.

Click on the “Install” button.

Install slack desktop from fedora software

Type your password and hit Enter.

Enter your password to install slack

And your application will begin installing on your Linux desktop.

RELATED: What Apps Can You Actually Run on Linux?

Install RPM Files in the Terminal

If you prefer using the command line (also known as the terminal), you can install an RPM package using the rpm command.

First, use the cd command to enter the directory where your RPM file is located. Alternatively, you can head over to the location of the downloaded file using the FIles app. Right-click anywhere in the folder and click on “Open in Terminal.”

Open the folder location in terminal

Copy and paste the following command and hit enter.

sudo rpm -i "package_name.rpm"

Ensure to replace “package_name.rpm” with the actual name of the package you’re installing. Here’s an example.

sudo rpm -i slack-4.23.0-0.1.fc21.x86_64.rpm

Enter the rpm command to install slack

If you’re having trouble copying the package’s name, you can type the first few words of the package name and press Tab to autocomplete. Alternatively, you can drag and drop the RPM file into the terminal. Then, press Enter.

You’ll be prompted for your password before pressing Enter again. Once the RPM file is installed, the application should now appear in the apps list.

With your application installed, consider learning some other beginner Linux commands, or you can level up with some terminal power user tricks.

RELATED: Become a Linux Terminal Power User With These 8 Tricks

Leave a Reply

Your email address will not be published. Required fields are marked *



Check Also

How to Add and Remove Users on Ubuntu

Hannah Stryker / How-To Geek To create a new user named “maxn” ...