摘要: (1)进入root用户 su root 密码:设置的root密码 (2)修改文件权限 sudo chmod +777 file (3)执行shell ./shellfile (4)编写shell 第一行:普通用户 #!/bin/sh,root用户 #!/bin/bash 阅读全文
posted @ 2016-12-20 22:27 雨花梦 阅读(4431) 评论(0) 推荐(0)
摘要: Ubuntu在shell的执行上用户root和普通用户是不一样的。 使用vi /etc/passwd 我们就可以看到在用户的最后一行也就是定义shell执行位置的地方root的位置是/bin/bash ,而其他的用户都是/bin/sh 所以在Ubuntu中root执行scipt的时候应该是bash 阅读全文
posted @ 2016-12-20 17:11 雨花梦 阅读(426) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-12-20 11:00 雨花梦 阅读(2013) 评论(0) 推荐(0)