The Internet is unanimous: kill is a Bash builtin. Bash changelog says the same.

However my other builtins apparently think otherwise:

$ builtin kill
bash: builtin: kill: not a shell builtin
$ type kill
kill is /bin/kill
$ command -V kill
kill is /bin/kill

This happens even though help kill gives documentation and man bash mentions kill in its “SHELL BUILTIN COMMANDS” section (but, if we start to interpret signs, elsewhere in the manual, it is only referred to as “the kill command”, whereas confirmed builtins are referred to as e.g. “the wait builtin”).

What is going on here? Is this part of a plan? I am running Bash 5.0.2 on Linux.

closed as off-topic by Michael Homer, LinuxSecurityFreak, dhag, Prvt_Yadv, Jeff Schaller Mar 31 at 8:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Michael Homer, LinuxSecurityFreak, dhag, Prvt_Yadv, Jeff Schaller
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Which distribution are you running, or is this a home-compiled version of bash ? Or do you have enable -n kill in your .profile (and related files) that would disable the builtin ? – Stephen Harris Mar 31 at 2:38
  • 3
    Oh you’re right, I have had enable -n kill for so long I forgot about it, and about the whole enabling/disabling mechanism. Well this is embarrassing. – Maëlan Mar 31 at 2:47
  • 1
    This is a valid question. According to comments, it did not go away on its own. OP responded to a comment, and did something about it. – ctrl-alt-delor Mar 31 at 9:39

kill is and has always been a built-in utility in bash like in was in the Korn shell. It needs to be built-in in order to be able to kill shell jobs (like with kill %1) as those job numbers are indexes in an internal table of the shell which an external kill could not know anything about.

Built-in utilities may be disabled using the enable command with its -n option.

It is clear from comments that you've had

enable -n kill

in one of your shell's startup files, which disables the built-in variant of the utility and forces the shell to use the external kill implementation in /bin/kill.

To resolve your issue, remove that command from whatever shell startup file it occurs in.

Not the answer you're looking for? Browse other questions tagged or ask your own question.