Basically it means you can tell the operating system to run the code in the file. For example, if the file was a binary executable, write access would allow you to modify it, read access would allow you to view it, but without execute permissions you would not be able to run the program. In the case of a script, its a little more complicted, because you don't necessarily need to 'run' the program, you can just read its contents into an interpreter, which itself has the execute privelige, but you do not need execute permissions on the script itself.
Some scripts in Linux are themselves executable, you will often see a line at the top like
#!/bin/bash
or
#!/bin/python
That line tells the kernel that the file can be executed by calling the relevant program (and isn't just text). Then you can just run your script like
./script
instead of having to do
python ./script
1What does this mean for non text-based filetypes eg.
.png
or.avi
? – iono – 2014-07-17T06:10:17.4301Basically the same, the file extension doesn't matter. If you have
#!/bin/bash
at the beginning of your.avi
file, it will be executed as bash. If it is a real avi format, you probably won't be able to run it because interpreting it as commands will not make sense and fail. – Mifeet – 2015-08-19T14:19:28.853Is the
#!
really interpreted by the kernel? – masterxilo – 2017-12-21T12:50:19.053