Execute Binary Files In Linux

How To Execute Binary Files In Linux

Linux has many format options for running applications from deb to rpm and the new formats snap and flatpak. Binary files can be in .bin or .run formats and although this can be easy to install it can be hard to remove and need an extra trick and a little experience to complete the removal.

Some of the .bin and .run files need root privileges to install or run the applications. For being able to install the applications you need to run it with sudo command.

‘sudo’ Command

Sudo permits the user to execute a command as a superuser (with higher privileges or root permissions).

On the example below, you can notice that trying to update using the terminal without root privileges gives you a permission error message.

sudo command

Running Binary Types (.bin and .run)

There are two ways to run binary applications, one is through the user interface and the other is going to the terminal.

User Interface Option

To Install using user interface, first, you need to make the file executable. To make the file executable first, right click on the binary file and then properties and go to permissions. On Permissions thick the check box with the option allow executing the file as program close the program and double click on the binary. If the file doesn’t run, just right click on it and select run on terminal to execute it.

execute binary files

Sometimes when you run the binary it takes a while to execute it if the file size is big. So be patient and wait for it. If it doesn’t try running it from terminal.

Terminal Option

To run it through terminal it’s not a hard task either. For being able to run it just make the file executable using chmod +x app-name.bin command and then execute it with ./app-name.bin.

Note that if the application doesn’t run with an error message permission denied with normal privileges you may need to use sudo ./app-name.bin

execute binary files from terminal

Conclusion

Linux has many options for running or installing applications which is one of the good things of Open Source, binary files are just one out there. There are snap packages, Flatpak, deb and many more, some applications are available on these formats so it’s up to choose which one you prefer.
So what application extension you choose?

2 thoughts on “Execute Binary Files In Linux

Leave a Reply

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

linux system administration bootcamp