In a bash shell, why can't I create an alias$ alias fooo=echo bacalias alert='notify-send --urgency=low -i $([ $? = 0 ] && echo terminal || echo error) $(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')'alias egrep='egrep --color=auto'alias fgrep='fgrep --color=auto'alias grep='grep --color=auto'alias l='ls -CF'alias la='ls -A'alias ll='ls -alF'alias ls='ls --color=auto'$ alias fooo='echo bac'alias alert='notify-send --urgency=low -i $([ $? = 0 ] && echo terminal || echo error) $(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')'alias egrep='egrep --color=auto'alias fgrep='fgrep --color=auto'alias grep='grep --color=auto'alias l='ls -CF'alias la='ls -A'alias ll='ls -alF'alias ls='ls --color=auto'$ fooofooo: command not found$ alias fooobash: alias: fooo: not foundIn another bash shell, the above commands succeed in creating an alias$ alias fooo=echo bac$ fooobacIn the first shell, if I start a new shell (just type bash and press enter), or start a new login shell (type bash -l), the above commands also succeed as in the second shell.Regarding the reply on alias command in the first shell$ which alias$ whereis aliasalias:$ builtin alias fooo=echo bacalias alert='notify-send --urgency=low -i $([ $? = 0 ] && echo terminal || echo error) $(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')'alias egrep='egrep --color=auto'alias fgrep='fgrep --color=auto'alias grep='grep --color=auto'alias l='ls -CF'alias la='ls -A'alias ll='ls -alF'alias ls='ls --color=auto'$ type aliasalias is a shell builtin$ type -a aliasalias is a shell builtin$ unalias aliasbash: unalias: alias: not foundRegarding the comment on echo in the first shell$ echo hellohello$ whereis echoecho: /bin/echo /usr/share/man/man1/echo.1.gz$ which echo/bin/echo
Why can't I create an alias in a bash shell?
bash;alias