How to Create an alias in Linux? [closed]

2020-05-09 23:20发布

Let's say I want to create an alias for srm (safe remove), such that everytime srm is used, an interactive rm command runs, e.g. rm –i. This change needs to be made to the necessary configuration files such that the alias is set every time any user logs in. Also show that your alias works.

How would i go about doing this?

1条回答
Viruses.
2楼-- · 2020-05-09 23:37

Edit your ~/.bashrc, adding the following line to the bottom:

alias srm="rm -i"
查看更多
登录 后发表回答