Binary files or bin files are executable files in the operating system also known as non-text files. These files can contain anything in it like images, compiled files, metadata, chain of sequential bytes or a text file having encoded binary data.
In Linux and Unix-like operating systems, .bin files contain machine code in it and can be executed on the system. All the data encoded in binary files cannot be readable by humans. These files can store anything except text.
How to Execute Binary Files in Linux:
To execute a binary file in a system, all you need to do is work as a super user with all privileges and permissions.
To run binary files on a Linux system, we need to make it executable by accessing them using a terminal. It can be done by following 3 steps.
-
- Open the command-line prompt by pressing ctrl+alt+t.
- The next step is to run without giving permission.
Now, the file is ready to run on Linux system, again open the terminal and type the command:
In this file doesn’t open and shows permission denied message, use sudo in command and run it again:
Conclusion
The .bin files are the binary files that contain information to be executed in a system. They are encoded with machine code and cannot be readable. The article has shown how we can make binary files executable by giving them permission. These files cannot be executed without permission access and sudo privileges.