type
status
date
slug
summary
tags
category
icon
password
由于运行 reboot 命令系统默认不需要输入密码,为了防止意外发生,必须设置关机提示。

编辑 .zshrc

$ vi ~/.zshrc
注意,如果使用 bash 的话,请编辑 .bashrc 文件。

追加内容

# Shutdown and restart confirmation alias shutdown="echo 'Are you sure?' If so, run /sbin/shutdown" alias reboot="echo 'Are you sure?' If so, run /sbin/reboot"

更新文件

$ source .zshrc
到此,每当运行 reboot 或者 shutdown 命令的时候,都会出现提示。 这只是其中一种笨方法,但是很简单。
 

赞赏


notion image
使用 RDM 连接 Homestead 中的 Redis如何在Linux中禁用网络摄像头和麦克风

  • Giscus
  • Cusdis
2012-2024 Jinva.

Jinva’s Blog

Powered by Hexo.