首 页文章中心

Linux学习网

您的位置Linux学习网 > Linux基本应用 > 文章内容

Fedora 7 执行命令不需要绝对路径

作者:mendation  来源:本站整理  发布时间:2007-8-15 8:05:00

在自己的用户目录下有一个隐藏文件.bashrc 修改该文件加入export PATH=".:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"

这样就OK了!这个时候你可以试试ifconfig 命令了!

看看直接在#ifconfig是不是可以用了!呵呵!我就是在f7下使用的!

方法二:

export PATH=$PARH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin


These commands can either be typed at the terminal each time you login, or you can add it to your .bashrc for bash shell or .cshrc for csh or tcsh so that each time you login, the PATH is already set. The $PATH means to keep the existing PATH and then append it with the other directories listed. This is helpful if a directory is set in the PATH by the System Administrator for everyone.

加载在这个文件中,每次都会重复写入,不如加载在.bash_profile中,从shell启动

收藏本页到: 365Key | del.icio.us | | 添加到雅虎收藏+
  • 网站帮助 - 广告合作 - 网站地图