I am learning Linux command from terminal,

It feedbacks 'command not found' for every command even though executed successfully.

$ > foo.txt
bash: prompt_git: command not found
$ umask
bash: prompt_git: command not found

How to solve such a problem?


The problem you are having is caused by a bad setting in your .bash_profile file.

One of the shell variables PS1 or PROMPT_COMMAND contains a call to prompt_git which is not (at that point) in your PATH. PS1 defines the prompt you see in the terminal and PROMPT_COMMAND is run every time the prompt is displayed.

Edit the file and remove the command and it will resolve your problem.

If you wish further help then please post the definitions of PS1 and PROMPT_COMMAND from your .bash_profile file.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .