linux下使用shutdown命令关机,提示: command not found
2008-10-25 09:15
656 查看
有点linux基础知识的,或者是系统的学习过计算机知识的人,没用过也能猜到,关机命令十有八九可能是shutdown。没错,实际上shutdown确实是liunx的关机命令,再配合各种选项,实现不同的关机效果。
然而在此之前,我却从没成功运行过shutdown。我是用普通用户登录,在终端下输入shutdown命令,结果显示 command not found。这就奇怪了,难道我的linux不支持这个命令?man了一下shutdown,大篇幅的说明告诉我,我的linux中是有这个命令的。但是什么执行无效呢?
开始怀疑普通用户无权使用关机命令,于是su——password——shutdown,结果还是 command not found。百思不得其解。
知道昨天,我才找到了解决方法:普通用户确实没有关机的权限,因此要关机,必须得到管理员的授权,su是必须的,但是,向我之前那样是不可以的,必须指定su的用户,即:
su - root(-前后各有一个空格)
password
shutdown -h now
这样就可以成功关机了,哈哈,原来如此!
但是还有一点不明,普通用户不能shutdown,怎么reboot却可以呢?
然而在此之前,我却从没成功运行过shutdown。我是用普通用户登录,在终端下输入shutdown命令,结果显示 command not found。这就奇怪了,难道我的linux不支持这个命令?man了一下shutdown,大篇幅的说明告诉我,我的linux中是有这个命令的。但是什么执行无效呢?
开始怀疑普通用户无权使用关机命令,于是su——password——shutdown,结果还是 command not found。百思不得其解。
知道昨天,我才找到了解决方法:普通用户确实没有关机的权限,因此要关机,必须得到管理员的授权,su是必须的,但是,向我之前那样是不可以的,必须指定su的用户,即:
su - root(-前后各有一个空格)
password
shutdown -h now
这样就可以成功关机了,哈哈,原来如此!
但是还有一点不明,普通用户不能shutdown,怎么reboot却可以呢?
相关文章推荐
- linux下使用shutdown命令关机,提示: -bash:shutdown:command not found
- linux下使用shutdown命令关机,提示: -bash:shutdown:command not found
- Linux 关机 shutdown -h now 提示 bash:command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- 在linux中执行wget命令提示 -bash: wget: command not found 解决方法
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- 今天领导分享了一个探测端口的命令-linux下提示bash:command not found
- Linux下运行mysql命令提示command not found解决办法
- Linux下提示命令找不到:bash:command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- 已解决:登录Linux后好多命令不能用,如使用service会报错service command not found
- linux下提示bash:command not found_带目录下命令列表介绍
- CentOS 7 ifconfig命令无法使用提示command not found
- Linux:-bash: ***: command not found,系统很多命令都用不了,均提示没有此命令
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found
- Linux(centos)不能使用FTP 命令 -bash: ftp: command not found