Skip to contentSkip to conversation

Bug report for the man page execve(2), the paragraph Interpreter scripts

DISCUSSION Alejandro Colomar 1 participant 1 message Aug 3, 2025 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Alejandro Colomar

author maintainer
#1 lore raw

Hi Nikola,

Quoted 8 lines · Никола Константинов Кралев

Hello,

with some manual testing, when a large optional-arg is placed I can see that the byte count limit is not 255/127 characters (since/before Linux 5.1) after the first two bytes of the file being "#!" these, but the actual count limit is 255 characters starting at file offset zero. So, technically, the largest possible full path that can be placed as the interpreter is (255 - strlen("#!")) bytes long.

Would you mind showing a test that demonstrates this?

Quoted 6 lines

Meaning that, the execve(2) man page https://www.man7.org/linux/man-pages/man2/execve.2.html should be corrected to something like:

The kernel imposes a maximum length on the text that follows the
"#!" characters at the start of a script; characters beyond the
limit are ignored. Before Linux 5.1, the limit is 127 characters including the "#!" characters at the start. Since Linux 5.1, the limit is 255 characters including the "#!" characters at the start.

Sounds good.

Quoted 2 lines

Should I manually send a pull request and edit the plaintext man page from its git repository? Or will the man page maintainers correct that?

Yes, you're welcome to send a patch! Please have a look at
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING>
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING.d>

Have a lovely day!
Alex

Signature · 1 line
<https://www.alejandro-colomar.es/>