发现

fedora7用了很久,却一直有个困惑,很多常见的命令比如:ifconfig,我却始终无法使用,这种命令按说是肯定内置安装的了。
为何总是提示我not found呢。
今天在fedora项目论坛上搜索了一下,找到一个非常有意义的回复:

When you become root in a Terminal do it this way:

su -

(su space dash) This will give you root’s path. If you only use ’su’ then you must give the full pathname to the command.

Wayne

原来,在终端中,如果使用仅仅使用su命令切换到root用户后,终端的环境变量并没有对应的切换到root用户,因此导致了很多常见的系统管理命令都是not found。
解决方法是在输入的时候键入:su -,也就是”su”+空格+“-”,然后切换到root用户后,环境变量也就自动切换到root下了。

小问题,在google和baidu上搜了几次都没有找到解决的办法,可是去官方论坛搜索,一次搞定。

Post a Comment

Your email is never shared. Required fields are marked *

*
*