需要root权限的命令为什么不提示?
Tofloor
poster avatar
deus
deepin
2016-10-09 07:38
Author
为什么需要root权限的命令直接都不提示,很尴尬,初学者会以为命令不存在的。
Reply Favorite View the author
All Replies
avatar
fengshutree
deepin
2016-10-09 16:10
#1
默认密码输入过程是不提示的
Reply View the author
avatar
deus
deepin
2016-10-09 19:45
#2
fengshutree 发表于 2016-10-9 08:10
默认密码输入过程是不提示的

那我怎么知道某个命令存不存在?
Reply View the author
avatar
qujin5211
deepin
2016-10-09 20:11
#3
https://bbs.deepin.org/post/44342
那我怎么知道某个命令存不存在?

请善用whereis和which  
Reply View the author
avatar
fengshutree
deepin
2016-10-09 20:31
#4
https://bbs.deepin.org/post/44342
那我怎么知道某个命令存不存在?

你输入某个命令且需要管理权限的时候才需要你输入密码。只不过在输入密码的过程中,在界面上是不显示的。
如果你的命令是错误的,估计也就不用提示你输入密码了。
Reply View the author
avatar
177******36
deepin
2016-10-11 18:51
#5
楼主的意思是“为什么需要root权限的命令”直接提示不存在,而不是“权限不够”
Reply View the author
avatar
iceyer
deepin
2016-10-11 19:17
#6
whereis fdisk
fdisk: /sbin/fdisk
这些命令不在你的path中,你需要把/sbin添加到PATH中。
Reply View the author
avatar
He8617439
deepin
2016-10-11 19:27
#7
有可能是前面的一个命令你已经输入过密码,后面的命令默认为不需要输入。
Reply View the author
avatar
deus
deepin
2016-10-11 23:11
#8
He8617439 发表于 2016-10-11 11:27
有可能是前面的一个命令你已经输入过密码,后面的命令默认为不需要输入。 ...

不是的,就是不提示,看上面截图,输入命令都不出结果,如果是默认不需要,应该出结果的。
Reply View the author
avatar
deus
deepin
2016-10-11 23:13
#9
Iceyer 发表于 2016-10-11 11:17
whereis fdisk
fdisk: /sbin/fdisk
这些命令不在你的path中,你需要把/sbin添加到PATH中。

我不可能一个一个命令加进去吧,我奇怪的是为什么deepin要配置成这样,不方便,其他系统都有提示。
Reply View the author
avatar
MeowSprite
deepin
2016-10-11 23:38
#10
https://bbs.deepin.org/post/44342
我不可能一个一个命令加进去吧,我奇怪的是为什么deepin要配置成这样,不方便,其他系统都有提示。 ...

不需要一个命令一个命令加,只需要把这个路径加到PATH里就好了。/sbin目录本身就是为root用户准备的。
Reply View the author
avatar
iceyer
deepin
2016-10-12 01:24
#11
https://bbs.deepin.org/post/44342
我不可能一个一个命令加进去吧,我奇怪的是为什么deepin要配置成这样,不方便,其他系统都有提示。 ...

为了所谓的安全, 普通用户是不能使用管理员命令的。
ls说了,不需要一个一个加,加几个sbin相关的目录就可以了
Reply View the author