# 举例子,修改cd的默认路径 function cd() { if [ $# == 0 ]; then builtin cd ~/work else builtin cd $* fi }
https://www.tutorialkart.com/bash-shell-scripting/bash-override-commands/#:~:text=Bash – Override Commands %3A In this Bash,have to create a function with name ps.