fdisk command not found - Ubuntu

Page content

How to Install fdisk Command on Ubuntu

If you are trying to use the fdisk command on Ubuntu and receive a “command not found” error, it is likely because the fdisk utility is not installed by default on your system. fdisk is a command-line disk partitioning tool used for disk management on Linux systems.

To install the fdisk command on Ubuntu, follow these steps:

  1. Open a terminal window by pressing Ctrl + Alt + T.
  2. Update the package list to ensure you have the latest information about available packages by running the following command:
    sudo apt update
    
  3. Install the fdisk utility by running the following command:
    sudo apt install util-linux
    
  4. Once the installation is complete, you can use the fdisk command to manage your disks and partitions.

If the fdisk command is not available on your Ubuntu system, you can use the parted utility as an alternative. parted is another command-line tool for disk partitioning that provides similar functionality to fdisk.

To install parted on Ubuntu, run the following command:

sudo apt install parted

After installing parted, you can use it as a substitute for fdisk to manage your disks and partitions.

Conclusion

In this tutorial, you learned how to install the fdisk command on Ubuntu and, in case it is not available, how to use the parted utility as an alternative for disk management. By following these steps, you can efficiently manage your disks and partitions on your Ubuntu system.