關閉rm並且使用trash - jenhaoyang/backend_blog GitHub Wiki

編輯bash alias
修改 ~/.bash_aliases
或是 ~/.bashrc

關閉rm
alias rm='echo "rm is disabled, use trash or /bin/rm instead."'
安裝trash
sudo apt-get install trash-cli

參考:
https://vitux.com/ubuntu-command-line-trash-bin/
https://www.commandlinefu.com/commands/view/10118/disable-rm-use-trash-instead
https://ubuntuqa.com/zh-tw/article/10666.html
https://www.cyberciti.biz/faq/create-permanent-bash-alias-linux-unix/