There are tons of ways to install an application on a Linux system. Most of the methods are so conventional and easy to install. If we look at the package extensions of different Linux distributions, Debian and Ubuntu Linux use the .dep packages. RedHat and Fedora use the .rpm packages to execute and install the package. But what if you can’t find a suitable, installable, and compiled package for a specific package? No worries, you can always find either a .bin or a .run package file that you can install on your Linux system.
The .bin file is the binary packages, and the .run file is the goto run file of a complied package, but they are not an actual package that you can conventionally execute on Linux. However, there are methods that you can apply to make the .bin and .run files executable on a Linux system.
Source of .bin and .run Packages
If you are a programmer, maybe you already know the source of the .bin and .run files. This type of file is created by developers for either quality checking or building a binary package to test the package. But sometimes undergraduate level research students also build .bin or .run packages to test some features of any application.
Many developers and users believe that .run and .bin files are the source code of any package. I might say that source code is the raw code of any package to edit the code in a script. On the other hand, the .run and .bin files are the developed and compiled versions of source codes. As GitHub is the largest repository of source code and packages, you can often find .bin and .run packages on GitHub.
Execute .bin and .run Packages on Linux
If you are a newbie on Linux, it could be challenging to find a method of executing .bin and .run package files on Linux. We have seen what a .run and .bin package file is and where they come from. As the .bin and .run files are not conventional packages, you can’t execute them on Linux in a traditional method. No matter what the actual source of the file is or which distro you’re using, in this post, we will see how you can execute .bin and .run files on a Linux system.
Download .bin and .run Packages
Typically Linux users prefer to install the .dep, .rpm, and other package files to install it on the system. But what you don’t know is, sometimes the .bin package could be more featureful and easy to use. Some software developers willingly provide the .bin or .run packages on their official website; you can also find the binary and run packages on any package’s official website.
However, here I will show you how you can find the .run and the .bin packages. If we visit Firefox’s official website, we can see that they put an option to download the compressed version of the binary file of Firefox in the download section.
Let’s look for a solid and compiled .bin of a package. We can visit Apache’s website and download the .bin package of ApacheDS (Apache Directory) to execute on a Linux system.
And now, if we visit the website of Xampp, we can find a link to download the .run package of Xampp. Download the file and keep it inside your system.
1. Execute the .bin Package on Linux
Previously, we have downloaded the binary (.bin) package of Firefox and ApacheDS. One of them was in the compressed version between those two files, and another was just a solid .bin package. Here, we will see how you can execute .bin packages on a Linux system no matter if the packages are complied or compressed.
Method 1: Execute the .bin Package from a Compressed file
First, we have to extract the compressed binary file to dig inside the .bin file. I have used the GNOME archive manager to extract the file; you can use any compression tool to extract the folder. Once the folder is extracted, find the binary package.
As we have downloaded the binary file of Firefox, so we will be looking for the firefox-bin file. You can find the .bin file manually, or you can use the cd (change directory) commands given below.
Now, run the following chmod command is given below to provide the execution permission for .bin the file.
ls cd firefox-84.0 ls cd firefox ls sudo chmod +x ./firefox-bin
Finally, you can now run the following dot slash (./) command given below to execute the .bin package on your Linux system.
./firefox-bin
Method 2: Directly Execute a .bin Package
Earlier, we have seen how to find and execute a .bin package inside a directory from a bunch of other files. We will now see how you can directly run and execute a compiled .bin package on a Linux system.
Here, we will use the .bin package of ApacheDS that we have downloaded earlier. The file is downloaded and stored inside the local downloads directory of the Linux filesystem. You can use the following cd commands given below to find the file.
/Downloads/New Folder$ ls
Then run the following change mode (chmod) command given below to make the .bin file executable. Finish the task with your root password.
sudo chmod +x ./apacheds-2.0.0.AM26-64bit.bin
You can now finally run the following dot slash (./) command given below with the root privileges to execute the .bin on your Linux system. There you go, your .bin package is now executed successfully.
./apacheds-2.0.0.AM26-64bit.bin
2. Execute the .run Package on Linux
Executing a .run package on a Linux system is pretty similar to executing a .bin package. However, we will now see how you can execute the .run package on your Linux system. Here, we will use the .run package of XAMPP that you have downloaded earlier.
First, run the cd command on your terminal shell to locate the .run package. Then run the following change mode command with the root privileges given below to permit the execution process.
cd Downloads ls
Finally, run the dot slash (./) command to execute the .run package on your Linux system.
sudo chmod +x ./xampp-linux-x64-7.4.13-0-installer.run ./xampp-linux-x64-7.4.13-0-installer.run
Final Words
The .run and .deb packages are not the conventional types of packages we usually install on Linux systems. The .run and .bin packages are suitable for testing and simulation tasks. Installing .bin and .run files are not so much complicated on a Linux system, but removing them could be complicated. You might need to know which path you used to execute the files.
Moreover, if you download the .run or the .bin packages from an unknown or suspicious source, you should be more careful while executing the .bin or .run packages on your Linux system. I have described how you can download and execute the .deb and .run packages on a Linux system in the entire post. You can also use the same method to execute the .sh packages on a Linux system.
If you like this post and find it useful, please share it with your friends and the Linux community. We also encourage you to write down your opinions regarding this post in the comment section.