为什么输入shutdown -h -t会报错:command not fount
如果是直接用普通用户($)的身份进行输入[user@localhost ~]$ shutdown -h -t 是不能执行,因为普通用户没有关闭机器的权限。
然而直接使用[user@localhost ~]$ su 也是不行的。而是要使用[user@localhost ~]$ su - root ;
su命令和su - 命令最大的本质区别就是:前者只是切换了root身份,但Shell环境仍然是普通用户的Shell;而后者连用户和Shell环境一起切换成root身份了。只有切换了Shell环境才不会出现PATH环境变量错误。su切换成root用户以后,pwd一下,发现工作目录仍然是普通用户的工作目录;而用su -命令切换以后,工作目录变成root的工作目录了。用echo $PATH命令看一下su和su -以后的环境变量有何不同。以此类推,要从当前用户切换到其它用户也一样,应该使用su -命令。---来自 http://www.ha97.com/4001.html

为什么输入shutdown -h -t会报错:command not fount的更多相关文章
- Robotframework学习笔记之—Rrobotframework运行报错“command: pybot.bat --argumentfile”
Rrobotframework运行报错"command: pybot.bat --argumentfile" 解决方案: 1.可能是缺失文件: 1.1.检查python安装目录下的 ...
- 在MacOS下Python安装lxml报错xmlversion.h not found 报错的解决方案
最近在看一个自动化测试框架的问题,需要用到Lxml库,下载lxml总是报错. 1,使用pip安装lxml pip install lxml 2,然后报错了,报错内容是: In file include ...
- 阿里云服务器tomcat ./shutdown.sh关闭命令报错Could not contact localhost:8005. Tomcat may not be running.
JDK1.8运行./shutdown 停止tomcat报错: 昨天购买了一个阿里云服务器,由于时间问题今天才来启动tomcat,启动的时候才发现跟我以前使用的服务器不太一样,去网上搜索了半天以为是to ...
- Tomcat启动慢(运行shutdown.sh的时候报错)
Using CATALINA_BASE: /usr/local/tomcatUsing CATALINA_HOME: /usr/local/tomcatUsing CATALINA_TMPDIR: / ...
- 安装 xadmin 报错: Command "python setup.py egg_info" failed with error code 1 in C:\Users\Python\AppData\Local\Temp\pip-install-1k1byg0p\xadmin\
报错详情 安装 xadmin 组件的时候报错 不论是命令行还是 pycharm 方式都不行 分析报错 按照报错提示是说 README.rst 文件的编码问题导致. 解决报错 通过 github 下载源 ...
- vue-create 报错 command failed: yarn --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist 完美解决方案
@vue/cli 3.x 创建项目失败解决方案 报错信息 command failed: yarn --registry=https://registry.npm.taobao.org --distu ...
- python下pip 安装 pyautogui报错Command "python setup.py egg_info" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-install-svhtepho\pygetwindow\
python装的3.6 64位,使用命令pip install pyautogui 或者pip install -U pyautogui 都失败了 报错如下: Command "python ...
- Idea debug报错Command line is too long
问题: 使用idea开发Java项目,写单元测试,debug时,会有红字报错:Command line is too long 解决方法: 在项目的目录下,找到/.idea/workspace.xml ...
- xcode 运行报错 Command /usr/bin/codesign failed with exit code 1
因为更换了证书,导致在运行时报错 Command /usr/bin/codesign failed with exit code 1,查看了网上各种方法,最后发现以下两个值没有同步更新
随机推荐
- EXTJS4.0 显示图片 动态图片
在网上找了好久没有好的解决方法 都是用 'box' 什么的组件 改写的 autoEl 好麻烦,修改 好的属性都不能用.弄了好久没弄成 最后: 用panel 显示 html 文本 追加 ‘'<i ...
- 主流 NoSQL 数据库对比
HBase HBase 是 Apache Hadoop 中的一个子项目,属于 bigtable 的开源版本,所实现的语言为Java(故依赖 Java SDK).HBase 依托于 Hadoop 的 H ...
- hdu 1242 Rescue (BFS)
Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- 使AD域控服务器Administrator的密码永不过期方法。
在安装完AD域后,管理员密码会42天就要更新一次,这样对测试比较不方便, 如果要让域控管理员账号密码永远不过期,就照着下面的方法执行: open a Command Prompt as the adm ...
- cpj-swagger分别整合struts2、spring mvc、servlet
cpj-swagger 原文地址:https://github.com/3cpj/swagger 1. Swagger是什么? 官方说法:Swagger是一个规范和完整的框架,用于生成.描述.调用和可 ...
- mac 安装 mysql 配置
前言:下面主要介绍2种安装方法以及后续的配置,希望对大家有帮助.(推荐通过安装包的形式安装) 1. 使用安装包安装 mysql 双击打开安装文件 双击pkg文件安装 一 ...
- 转:Mysql explain
转自:http://blog.csdn.net/zhuxineli/article/details/14455029(单纯学习而转) explain显示了MySQL如何使用索引来处理select语句以 ...
- TemplateBinding和Binding
TemplateBinding是Binding的一个轻量级版本,它失去了成熟版本Binding的很多功能,比如继承内容引用(inheritence context referencing),Relat ...
- 颜色混合opengl--glBlendFunc函数
http://www.cnblogs.com/ylwn817/archive/2012/09/07/2675285.html 颜色混合opengl--glBlendFunc函数 原文:http://b ...
- C++笔试题目大全(笔试宝典)(不断完善中)
1.new . delete . malloc . free 关系 delete 会调用对象的析构函数 , 和 new 对应 free 只会释放内存, new 调用构造函数. malloc 与 fre ...