Default Installation Path for unrar on Ubuntu

This article explains the default installation path of the unrar utility on Ubuntu Linux systems and outlines straightforward methods to locate and verify the executable binary using built-in terminal commands.

The Default Path

On Ubuntu, when you install the standard non-free or free version of unrar via the apt package manager, the executable binary is placed in:

/usr/bin/unrar

Because /usr/bin is included in the default system $PATH environment variable, you can run the unrar command from any directory in the terminal without specifying its absolute file path.

How to Verify the Installation Path

You can confirm the exact location of the unrar executable on your system using one of the following terminal commands:

1. Using the which Command

The which command locates the binary executable associated with the given command name:

which unrar

Output:

/usr/bin/unrar

2. Using the whereis Command

The whereis command finds the binary, source, and manual page files for the program:

whereis unrar

Output:

unrar: /usr/bin/unrar /usr/share/man/man1/unrar.1.gz

3. Using the type Command

The type command describes how the shell interprets the command:

type -p unrar

Output:

/usr/bin/unrar

Installing unrar if Missing

If the commands above return no output, the package is not installed. To install it to the default path, enable the multiverse repository and run:

sudo apt update
sudo apt install unrar