Shebang line limit in bash and linux kernel

Limited to 127 chars on 99.9% of systems due to kernel compile time buffer limit.

It’s limited in the kernel by BINPRM_BUF_SIZE, set in include/linux/binfmts.h.

Leave a Comment