Linux Issue | bash: fdisk-l: command not found solves [root @ localhost boot] # fdisk-l <-- the following error occurs when you use the fdisk command bash: fdisk-l: command not found [root @ localhost boot] # whereis fdisk <-- query the fdisk command location fdisk: /sbin/fdisk/usr/share/man/man8/fdisk.8.gz [root @ localhost boot] # echo $ PATH <--- query environment variables/nfs/smartsvn/bin: /usr/local/sbin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/sbin: /usr/local/bin:/usr/java/jdk1.7.0 _ 25/bin: /usr/dev/svnclient/smartsvn-7_5_2/bin [root @ localhost boot] # echo $ PATH | grep/sbin/fdisk <-- confirm again that there is no fdisk command location [root @ localhost boot] # ln-s/sbin/fdisk/usr/local/sbin <-- add fdisk to the search path of the current command to [root @ localhost boot] # cd/usr/local/ sbin <-- confirm that fdisk has been added to the environment variable [root @ localhost sbin] # ls-F | grep/sbin/fdisk [root @ localhost sbin] # ls-Ffdisk @ [root @ localhost sbin] # fdisk-l <-- use the fdisk command Disk/dev/sda: 21.5 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065*512 = 8225280 bytesSector size (logical/physical ): 512 bytes/512 bytesI/O size (minimum/optimal): 512 bytes/512 bytesDisk identifier: 0x000f1e94 Device Boot Start End Blocks Id System/dev/sda1 * 1 39 307200 83 LinuxPartition 1 does not end on cylinder boundary. /dev/sda2 39 2354 18598912 83 Linux/dev/sda3 2354 2611 2064384 82 Linux swap/Solaris