1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-06 23:55:23 +02:00
tldr/pages/common/alias.md
Pranaov S 8bc9dce9b1
pages/common/*: correct urls, see also improvements, unbashify pages, examples addition (#16841)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2025-06-14 19:02:15 +03:00

30 lines
654 B
Markdown

# 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` for Bash or `~/.zshrc` for Zsh.
> See also: `unalias`.
> More information: <https://manned.org/alias>.
- 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:
`alias {{rm}}="{{rm --interactive}}"`
- Create `la` as a shortcut for `ls --all`:
`alias {{la}}="{{ls --all}}"`