歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux命令 >> Linux 命令及可執行程序路徑的設置

Linux 命令及可執行程序路徑的設置

日期:2017/2/28 10:03:56   编辑:Linux命令
Linux命令

Fedora Core 4.0 FAQ ,同時也能用於Linux其它發行版

請在 當前用戶下的.bashrc 中加一行:


export PATH=".:/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"

然後
#source .bashrc

有些命令即便能調用,也不會出現任何信息,或者要輸入root密碼的,說明要以超級權限運行的;

比如


[beinan@localhost ~]$ fdisk -l
[beinan@localhost ~]$ su
Password:
[root@localhost beinan]# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 7751 39728745 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux
[root@localhost beinan]#

Copyright © Linux教程網 All Rights Reserved