Some commands are provided as both builtins and external utilities. Take echo for example. On my machine (macOS) running Bash 3.2,$ type echoecho is a shell builtinRunning man bash | less --pattern='^ *echo +\[' shows:echo [-neE] [arg ...]But running man 1 echo shows a man page for a different implementation of echo, with a different signature:echo [-n] [string ...]I'm able to use -e successfully, so I must be running the builtin, and presumably that's /bin/echo$ which echo/bin/echoWhere does the other implementation live, and how can I distinguish between builtins and external utils in general (e.g. printf)Update/Correction Thanks @Gilles for clarifying. And the proof is in the pudding!$ /bin/echo -e \tabc-e \tabc$ echo -e \tabc        abc
How to distinguish between builtin and external util? (e.g. echo)
shell builtin
To find out whether a command is built in, run type.$ type echoecho is a shell builtintype is itself a builtin and knows what commands are built in. (In bash, builtins can be disabled, and type will correctly report that a command is not built in if the builtin has been disabled.) type reports whatever will be executed if you use the command name alias, function, builtin or external command.which is an external command that reports the location of external commands. It doesn't know anything about aliases, functions or builtins. And it might even not report the correct external commands, depending on your setup. Just forget about which and use type instead.I must be running the builtin, and presumably that's /bin/echoNo! By definition, a builtin is not an external command. The code that implements the echo builtin, like all other builtins, is in /bin/bash. /bin/echo is an external command that has the same name as the echo builtin.When a command exists both as a builtin and as an external command, using its name calls the builtin. The precedence order for command names is alias, then function, then builtin, then external command in the directories listed in $PATH in order. If, for some reason, you want to force an external command, use its full path.