1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/alias.md

30 lines
618 B
Markdown
Raw Normal View History

# alias
> Create aliases - words that are replaced by a command string.
> Aliases expire with the current shell session unless defined in the shell's configuration file, e.g. `~/.bashrc`.
> More information: <https://tldp.org/LDP/abs/html/aliases.html>.
2019-05-15 01:05:57 +02:00
- List all aliases:
`alias`
- Create a generic alias:
`alias {{word}}="{{command}}"`
- View the command associated to a given alias:
`alias {{word}}`
- Remove an aliased command:
`unalias {{word}}`
- Turn `rm` into an interactive command:
2022-01-18 05:28:40 -08:00
`alias {{rm}}="{{rm --interactive}}"`
2022-01-18 05:28:40 -08:00
- Create `la` as a shortcut for `ls --all`:
2022-01-18 05:28:40 -08:00
`alias {{la}}="{{ls --all}}"`