把下面代码写入到 /etc/profile 内,并执行一次 source /etc/profile
自定义一个 func
really_reboot() { while true do echo -n "You really want to restart the server? (yes/no):" read crm if [ "$crm"x = "yes"x ]; then echo "rebooting" \reboot else break fi break done }
别名
alias reboot='really_reboot'
评论区