From Bash Manual:command [-pVv] command [arguments ...]Runs command with arguments ignoring any shell function named command.  Only shell builtin commands or commands found by searching the PATH  are executed. If there is a shell function named ls, running command  ls within the function will execute the external command ls instead  of calling the func- tion recursively. The -p option means to use a  default value for PATH that is guaranteed to fi nd all of the standard  utilities. The return status in this case is 127 if command cannot be  found or an error occurred, and the exit status of command otherwise.Does the manual explain why it fails when command is assignment or begins with assignment (for environment variables)?$ command aaa=1aaa=1: command not found$ command aaa=1 echo helloaaa=1: command not found
Why does command not work with a command beginning with assignment?
bash
You are confusing what POSIX calls a simple command which is a non empty sequence of optional assignments, optional redirections and optional words (including a command name and its optional arguments), and command as it is used in the Bash manual command synopsis which is here just a command name.Should you really want to use assignments here, you can simply run :aaa=1 command echo helloIf there is no command at all but just an assignment, there is no much point using the command command, given the fact there is no builtin or command to search in the PATH in the first place. Should you really want to just set a variable with command, you might usecommand typeset aaa=1orcommand declare aaa=1