How does Debian know how to execute my .NET programs even if I don't specify mono?
I have a program compiled with mcs meant for mono called: hello.exe. If I just do ./hello.exe it runs automatically. How does it happen? why do I not have to do mono hello.exe. Why does it run only with ./hello.exe I mean Linux wouldn't execute a code unless it knows the interpreter from the she-bang line or it is an ELF32 file. but my hello.exe is neither ELF file nor does it have a shebang line on the top. how then Linux understands that it must be executed with mono? Outputs from my console: (hello.exe is a C# program compiled using mcs. nc.exe is Netcat for windows. nc.exe is not a C# or .NET program) foss...@debian:~/lab/c$ ls -l nc.exe hello.exe -rwxr-xr-x 1 fossist fossist 3072 Feb 23 01:42 hello.exe -rwxr-xr-x 1 fossist fossist 61440 Dec 29 2004 nc.exe foss...@debian:~/lab/c$ file nc.exe hello.exe nc.exe:PE32 executable for MS Windows (console) Intel 80386 32-bit hello.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly foss...@debian:~/lab/c$ ./nc.exe; ./hello.exe run-detectors: unable to find an interpreter for ./nc.exe Hello World! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: How does Debian know how to execute my .NET programs even if I don't specify mono?
Hi, Foss User foss...@gmail.com writes: I have a program compiled with mcs meant for mono called: hello.exe. If I just do ./hello.exe it runs automatically. How does it happen? why do I not have to do mono hello.exe. Why does it run only with ./hello.exe You can register interpreters for binary formats with the binfmt_misc module. In Debian this is handled by the binfmt-support package. You can get a list of binary formats the system knows about with /usr/sbin/update-binfmts --display Regards, Ansgar -- PGP: 1024D/595FAD19 739E 2D09 0969 BEA9 9797 B055 DDB0 2FF7 595F AD19 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org