Executing a bin file in Linux/Ubuntu
Posted: Mon Apr 23, 2012 11:20 pm
I downloaded a file with extension 'bin' which states an executable file in the site I have downloaded it. But I try to execute it, it gave an error. I found out the problem was due to not setting file as executable. Here is how you could do it.
First type following command t see whether the file is executable.
It will return whether the file is "executable" and not "non-executable", not executable or something completely different. If you do not see "executable", the file is probably a CD-image(BIN/CUE) and not an executable .bin-file.
Now enter:
Now try to execute the file:
First type following command t see whether the file is executable.
Code: Select all
file /path/file.bin
Now enter:
Code: Select all
cd /path
chmod +x file.bin
Code: Select all
/path/file.bin