10 fdisk Commands to Manage Linux Disk Partitions

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

20 Responses

  1. Shipra Ranjan says:

    Hello Sir,

    I wanted to know about Patching. Why patching is necessary in Linux? What role patching plays in real time work.
    Please help me out.

  2. Shipra Ranjan says:

    How to make backup process for files and directory in linux in real time??? What are the steps in performing backup? When is backup performed?

  3. Shipra Ranjan says:

    I wanted to know how partition is done in real time. how to partition disk?? when we do partition?

  4. Rampukar says:

    what is the solution for this error!

    Partion number :1
    First sector (2048-15249407, default 2048) : ___(M,G,T,P)
    Value out of range. ERROR

    How can i decide the values for my disk, which size is 7.3GB?
    I am using primary type for partition.

  5. rahul says:

    Can someone please explain me this error message……..
    @ -HP-ENVY-Notebook:~$ sudo apt-get install ubuntu-restricted-extras openjdk-8-jdk
    [sudo] password for :
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    openjdk-8-jdk is already the newest version (8u91-b14-0ubuntu4~16.04.1).
    openjdk-8-jdk set to manually installed.
    You might want to run ‘apt-get -f install’ to correct these:
    The following packages have unmet dependencies:
    libstdc++-5-dev : Depends: libstdc++6 (>= 5.4.0-6ubuntu1~16.04.1) but 5.3.1-14ubuntu2.1 is to be installed
    libstdc++6 : Depends: gcc-5-base (= 5.3.1-14ubuntu2.1) but 5.4.0-6ubuntu1~16.04.1 is to be installed
    ubuntu-restricted-extras : Depends: ubuntu-restricted-addons but it is not going to be installed
    Recommends: unrar but it is not going to be installed
    Recommends: libavcodec-extra
    wine1.6-amd64 : Depends: wine1.6:any (= 1:1.6.2-0ubuntu14)
    Recommends: libcapi20-3 but it is not going to be installed
    Recommends: libosmesa6 but it is not going to be installed
    Recommends: unixodbc
    E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
    @ -HP-ENVY-Notebook:~$

    • Ravi Saive says:


      The openjdk-8-jdk package already installed on the system, why you want install again? about the error, its clear that you’ve older version of libstdc++-5-dev and system requires libstdc++6 in this case you need to upgrade your system to most recent version, if you want to correct these errors try running the following command:

      $ sudo apt-get -f install
      • rahul says:

        Hi Ravi, Thank a lot for your response. Actually I want to do netmeeting but getting the below error message. Can you please help me on this. I have Ubuntu 16 on my machine.

        Error Message:
        Java is NOT working.

        Enable Java in your browser, and then refresh this page to join the meeting. To enable Java, follow these steps:

        Select Tools > Add-ons.

        Find Java under Plugins section, and select Enable.

      • rahul says:

        Hi Ravi,

        Getting the below message while running the command.

        TrueType core fonts for the Web EULA


        │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement
        │ (“EULA”) is a legal agreement between you (either an individual or a
        │ single entity) and Microsoft Corporation for the Microsoft software
        │ accompanying this EULA, which includes computer software and may include
        │ associated media, printed materials, and “on-line” or electronic
        │ documentation (“SOFTWARE PRODUCT” or “SOFTWARE”). By exercising your
        │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be
        │ bound by the terms of this EULA. If you do not agree to the terms of
        │ this EULA, you may not use the SOFTWARE PRODUCT.

  6. rahul says:

    Hi, How to check the partition where Ubuntu has been installed. When I have Windows-10 as another partition.

    • Ravi Saive says:


      In Ubuntu, by default the Windows partition mounted and you can view the partition from the Computer tab on the Desktop or you use following command view the windows mounted partition as shown:

      $ sudo fdisk -l

      You will see some-think like:

      /dev/sda5     4892672 1173295103 1168402432 557.1G Microsoft basic data
  7. Joginder Singh says:

    In General we are create /boot partition without LVM any Specific reason .

    • Ravi Saive says:


      A /boot partition is a partition that includes important files for booting Linux operating system properly,

      When it comes to LVM, the /boot partition must be created separately under normal disk partitioning, because grub boot loaders could not read files from an LVM partition. So, its always better approach to create a separate /boot partition.

      I hope it will clear your confusion…

  8. Rchery says:

    Should also mention that fdisk doesn’t support drives bigger than 2TB, parted/Gparted should be used for larger drives.

  9. David D says:

    Just wanted to note that “format disk” is incorrect as this tool never has formatted a drive/disk. Formatting refers to creating a filesytem and overwriting an old one in some cases. That is more like what mkfs does not what fdisk does. As you have shown, fdisk is a partitioning tool.

  10. Aaron Kili K says:

    There is an error in the write up “7. How to Formatting a Partition in Linux”, supposed to be”How to format a partition in Linux”

    • Ravi Saive says:


      Oh man thanks for your findings in the article, always appreciated your work towards Tecmint. Corrected in the writeup..

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *