builtin

alias

Define parser-level command-word substitution. Define before the line using it is parsed.

Formal Syntax & Structure

bash syntaxbash
alias name=value

Return Value

exit status

Define parser-level command-word substitution. Define before the line using it is parsed.

Working Example

Example Snippetbash
shopt -s expand_aliasesalias bmhello='printf "%s\n" hello'bmhellounalias bmhelloif alias bmhello >/dev/null 2>&1; then exit 1; fi
Bash Reference