RedHat cannot use Fdisk under Linux 5

Source: Internet
Author: User

When I recently used Redhat Linux5, I encountered the following error using the FDISK command:

Bash:fdisk:command not found

Found on the Internet, the solution is as follows:

First, the reason for this error is that Fdisk is not in path

To view path paths:

[[Email protected] ~] $echo $PATH

/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/baixiaohu/bin

Locate the Fdisk path:

[[Email protected] ~] $whereis fdisk

Fdisk:/sbin/fdisk/usr/share/man/man8/fdisk.8.gz

The Fdisk path is added to the path path, using the LN directive:

[[Email protected] ~] $su

passwd

[[Email protected] ~] #ln-S/sbin/fdisk/usr/bin

To view the/usr/bin directory:

[[Email protected] ~] #find/usr/bin|grep "fdisk"

/usr/bin/fdisk

You can use the FDISK command below.

[[Email protected] ~] #fdisk-L

disk/dev/sda:1000.2 GB, 1000204886016 bytes
255 heads, Sectors/track, 121601 cylinders
Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 200781 Linux
/dev/sda2 2065 16386300 swap/solaris
/dev/sda3 2066 65806 511999582+ -up Linux
/dev/sda4 65807 121601 448173337+ 5 Extended
/dev/sda5 65807 84928 153597433+ -up Linux
/dev/sda6 84929 97676 102398278+ -up Linux
/dev/sda7 97677 102775 40957686 -up Linux
/dev/sda8 102776 105325 20482843+ -up Linux
/dev/sda9 105326 109150 30720000 -up Linux

RedHat cannot use Fdisk under Linux 5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.