How do I create a permanent Bash alias?
Posted
by
Bakhtiyor
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Bakhtiyor
Published on 2010-12-15T07:54:39Z
Indexed on
2011/06/28
16:31 UTC
Read the original article
Hit count: 437
I would like to create an alias to rm
command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'
. But as far as I know this is a temporary alias and it lives until you close the terminal.
As it is explained here to save alias permanently I need to execute ~/.bash_aliases
or ~/.bashrc
commands in terminal and add my alias there. But when I execute ~/.bashrc
I get following error message :
bash: /home/bakhtiyor/.bashrc: Permission denied
When I run ~/.bash_aliases
I get another error message like this:
bash: /home/bakhtiyor/.bash_aliases: File or directory doesn't exist.
What is the actual problem and how can I solve it?
© Ask Ubuntu or respective owner