alias

Ответить
ya
^-^
Сообщения: 2336
Зарегистрирован: 16 дек 2021, 19:56

alias

Сообщение ya »

Creating global aliases for all users

If you want the aliases to be available for all users on your Linux system, you should add the aliases in /etc/bash.bashrc file.

If you don’t have this file, create it.
How to see all the alias set on your Linux system for you

If you want to see all the alias set on the system for you, you can check the configuration file of your shell like ~/.bashrc, ~/.zshrc etc.

However, a much easier way to see all the alias would be to simply run the alias command without any arguments.

alias

A typically Ubuntu system has the following alias set by default.

alias
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 -lrt'
alias ls='ls --color=auto'

How to remove alias

If you want to remove an alias, you can use the unalias command in this manner:

unalias your_alias_name

You can remove all alias at once using the -a option:

unalias -a
Ответить