tldr/pages/common/alias.md

25 lines
461 B
Markdown
Raw Normal View History

# alias
> Creates an alias for a word when used as the first word of a command.
> Note that these operations are not permanent, expiring when the current shell session ends.
- Create a generic alias:
`alias {{word}}="{{command}}"`
- Remove an aliased command:
`unalias {{word}}`
- List all aliased words:
`alias -p`
- Turn rm into an interactive command:
`alias {{rm}}="{{rm -i}}"`
- Create `la` as a shortcut for `ls -a`:
2015-10-22 08:31:52 +01:00
`alias {{la}}="{{ls -a}}"`