Rate this page del.icio.us  Digg slashdot StumbleUpon

Tips and tricks: How can I find the label name of my swap partition?

by the editorial team

To find the label of a partition, use this command:

# blkid -s LABEL /dev/<partition>

Replace <partition> with the name of the swap partition.

This command will also work with any other type of partition

Red Hat’s customer service and support teams receive technical support questions from users all over the world. Red Hat technicians add the questions and answers to Red Hat Knowledgebase on a daily basis. Access to Red Hat Knowledgebase is free. Red Hat Magazine offers a preview into the Red Hat Knowledgebase by highlighting some of the most recent entries. The information provided in this article is for your information only. The origin of this information may be internal or external to Red Hat. While Red Hat attempts to verify the validity of this information before it is posted, Red Hat makes no express or implied claims to its validity.

3 responses to “Tips and tricks: How can I find the label name of my swap partition?”

  1. Ahmed Shabana says:

    there is another simple method to find a label of partition

    # findfs LABEL=/dev/sda5

  2. Ahmed Shabana says:

    sorry for the error

    #findfs LABEL=

  3. Ahmed Madkour says:

    # findfs LABEL=label
    will search the disks in the system for a filesystem has a specified label, or you can use

    # findfs UUID=uuid
    which will search a filesystem has a specified uuid

    thnx

Leave a reply