How can I change the hard disk name in Ubuntu?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







3















I have a computer with Ubuntu installed. By default the hard disk name consists of a sequence of numbers and letters, which is not easy to remember nor input into a terminal.



How can I change the hard disk name in Ubuntu? Which file do I need to change?










share|improve this question

























  • Do you mean the path to the device (/dev/sdb1), UUID (550e8400-e29b-11d4...) or the label/name of a partition?

    – Bobby
    Apr 8 '10 at 9:11











  • path to device as i understood is correct, nothing special. UUID has different mask, not the name. I mean label/name under "/media" folder. do you understand?

    – Vytas
    Apr 8 '10 at 9:20













  • sorry, i just install gparted and i was wrong, i need to change UUID, because UUID and label/name under /media is same.

    – Vytas
    Apr 8 '10 at 9:28


















3















I have a computer with Ubuntu installed. By default the hard disk name consists of a sequence of numbers and letters, which is not easy to remember nor input into a terminal.



How can I change the hard disk name in Ubuntu? Which file do I need to change?










share|improve this question

























  • Do you mean the path to the device (/dev/sdb1), UUID (550e8400-e29b-11d4...) or the label/name of a partition?

    – Bobby
    Apr 8 '10 at 9:11











  • path to device as i understood is correct, nothing special. UUID has different mask, not the name. I mean label/name under "/media" folder. do you understand?

    – Vytas
    Apr 8 '10 at 9:20













  • sorry, i just install gparted and i was wrong, i need to change UUID, because UUID and label/name under /media is same.

    – Vytas
    Apr 8 '10 at 9:28














3












3








3


2






I have a computer with Ubuntu installed. By default the hard disk name consists of a sequence of numbers and letters, which is not easy to remember nor input into a terminal.



How can I change the hard disk name in Ubuntu? Which file do I need to change?










share|improve this question
















I have a computer with Ubuntu installed. By default the hard disk name consists of a sequence of numbers and letters, which is not easy to remember nor input into a terminal.



How can I change the hard disk name in Ubuntu? Which file do I need to change?







ubuntu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 26 '14 at 8:12









Der Hochstapler

68.5k50232288




68.5k50232288










asked Apr 8 '10 at 9:04









VytasVytas

2573717




2573717













  • Do you mean the path to the device (/dev/sdb1), UUID (550e8400-e29b-11d4...) or the label/name of a partition?

    – Bobby
    Apr 8 '10 at 9:11











  • path to device as i understood is correct, nothing special. UUID has different mask, not the name. I mean label/name under "/media" folder. do you understand?

    – Vytas
    Apr 8 '10 at 9:20













  • sorry, i just install gparted and i was wrong, i need to change UUID, because UUID and label/name under /media is same.

    – Vytas
    Apr 8 '10 at 9:28



















  • Do you mean the path to the device (/dev/sdb1), UUID (550e8400-e29b-11d4...) or the label/name of a partition?

    – Bobby
    Apr 8 '10 at 9:11











  • path to device as i understood is correct, nothing special. UUID has different mask, not the name. I mean label/name under "/media" folder. do you understand?

    – Vytas
    Apr 8 '10 at 9:20













  • sorry, i just install gparted and i was wrong, i need to change UUID, because UUID and label/name under /media is same.

    – Vytas
    Apr 8 '10 at 9:28

















Do you mean the path to the device (/dev/sdb1), UUID (550e8400-e29b-11d4...) or the label/name of a partition?

– Bobby
Apr 8 '10 at 9:11





Do you mean the path to the device (/dev/sdb1), UUID (550e8400-e29b-11d4...) or the label/name of a partition?

– Bobby
Apr 8 '10 at 9:11













path to device as i understood is correct, nothing special. UUID has different mask, not the name. I mean label/name under "/media" folder. do you understand?

– Vytas
Apr 8 '10 at 9:20







path to device as i understood is correct, nothing special. UUID has different mask, not the name. I mean label/name under "/media" folder. do you understand?

– Vytas
Apr 8 '10 at 9:20















sorry, i just install gparted and i was wrong, i need to change UUID, because UUID and label/name under /media is same.

– Vytas
Apr 8 '10 at 9:28





sorry, i just install gparted and i was wrong, i need to change UUID, because UUID and label/name under /media is same.

– Vytas
Apr 8 '10 at 9:28










5 Answers
5






active

oldest

votes


















3














You can use Labeling Program for Ubuntu.



but if you want something with Terminal, try this



for FAT 12 and 32 Systems, these file systems are most often found on USB thumb drives, flash cards (like for a camera or cell phone), and older external USB hard drives. but may be if your hard disc is FAT 12 or 32 . Thus, check current name in terminal



sudo mlabel -i <device> -s 


for example : sudo mlabel -i /dev/sdb1 ::my_external



if not you edit mtools.conf as sudo



sudo nano /etc/mtools.conf 


add something like for each drive:



   drive p: file="/dev/sdb1"
drive q: file="/dev/sdb2"


Then use sudo mlabel p:new_label . for example , sudo mlabel p:30GB_FAT32



If your HD is in NTFS ,



first, check the current label sudo ntfslabel <device>



and rename like that sudo ntfslabel <device> <label> Note: 128 characters maximum.



most of linux formatted HD are with ext3, ext4 . thus,



check the lable first sudo e2label <device> and rename sudo e2label <device> <label>. Note: 16 characters maximum.



for more, you should take a look at here.






share|improve this answer































    1














    You can change the label of the partition. This is the name usually given to new drives appearing in /media. For this you need to edit the partition table, I would suggest you install gparted with the package manager and us that. Be careful what you do with that tool, it can destroy all your data.






    share|improve this answer
























    • thanks. how about how to change UUID?

      – Vytas
      Apr 8 '10 at 9:28



















    1














    In Ubuntu 13.04, you can use the native "e2label" from terminal.



    Steps:





    1. list the disks to see which is the one you want to change:



      sudo fdisk -l



    2. change the disk name:



      sudo e2label /dev/sdb1 "mydiskname"







    share|improve this answer

































      0














      For XFS: xfs_admin -L NEWLABEL /dev/sda1



      For JFS: jfs_tune /dev/sda2 -L NEWLABEL



      For ReiserFS: reiserfstune /dev/sda2 -l NEWLABEL



      Partitions must be umounted and has to be executed by root.






      share|improve this answer































        0














        Show Applications -> Disks -> select disk to change name -> setting icon -> edit filesystem -> change -> done



        img1



        img2



        img3






        share|improve this answer


























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f128751%2fhow-can-i-change-the-hard-disk-name-in-ubuntu%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          5 Answers
          5






          active

          oldest

          votes








          5 Answers
          5






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          You can use Labeling Program for Ubuntu.



          but if you want something with Terminal, try this



          for FAT 12 and 32 Systems, these file systems are most often found on USB thumb drives, flash cards (like for a camera or cell phone), and older external USB hard drives. but may be if your hard disc is FAT 12 or 32 . Thus, check current name in terminal



          sudo mlabel -i <device> -s 


          for example : sudo mlabel -i /dev/sdb1 ::my_external



          if not you edit mtools.conf as sudo



          sudo nano /etc/mtools.conf 


          add something like for each drive:



             drive p: file="/dev/sdb1"
          drive q: file="/dev/sdb2"


          Then use sudo mlabel p:new_label . for example , sudo mlabel p:30GB_FAT32



          If your HD is in NTFS ,



          first, check the current label sudo ntfslabel <device>



          and rename like that sudo ntfslabel <device> <label> Note: 128 characters maximum.



          most of linux formatted HD are with ext3, ext4 . thus,



          check the lable first sudo e2label <device> and rename sudo e2label <device> <label>. Note: 16 characters maximum.



          for more, you should take a look at here.






          share|improve this answer




























            3














            You can use Labeling Program for Ubuntu.



            but if you want something with Terminal, try this



            for FAT 12 and 32 Systems, these file systems are most often found on USB thumb drives, flash cards (like for a camera or cell phone), and older external USB hard drives. but may be if your hard disc is FAT 12 or 32 . Thus, check current name in terminal



            sudo mlabel -i <device> -s 


            for example : sudo mlabel -i /dev/sdb1 ::my_external



            if not you edit mtools.conf as sudo



            sudo nano /etc/mtools.conf 


            add something like for each drive:



               drive p: file="/dev/sdb1"
            drive q: file="/dev/sdb2"


            Then use sudo mlabel p:new_label . for example , sudo mlabel p:30GB_FAT32



            If your HD is in NTFS ,



            first, check the current label sudo ntfslabel <device>



            and rename like that sudo ntfslabel <device> <label> Note: 128 characters maximum.



            most of linux formatted HD are with ext3, ext4 . thus,



            check the lable first sudo e2label <device> and rename sudo e2label <device> <label>. Note: 16 characters maximum.



            for more, you should take a look at here.






            share|improve this answer


























              3












              3








              3







              You can use Labeling Program for Ubuntu.



              but if you want something with Terminal, try this



              for FAT 12 and 32 Systems, these file systems are most often found on USB thumb drives, flash cards (like for a camera or cell phone), and older external USB hard drives. but may be if your hard disc is FAT 12 or 32 . Thus, check current name in terminal



              sudo mlabel -i <device> -s 


              for example : sudo mlabel -i /dev/sdb1 ::my_external



              if not you edit mtools.conf as sudo



              sudo nano /etc/mtools.conf 


              add something like for each drive:



                 drive p: file="/dev/sdb1"
              drive q: file="/dev/sdb2"


              Then use sudo mlabel p:new_label . for example , sudo mlabel p:30GB_FAT32



              If your HD is in NTFS ,



              first, check the current label sudo ntfslabel <device>



              and rename like that sudo ntfslabel <device> <label> Note: 128 characters maximum.



              most of linux formatted HD are with ext3, ext4 . thus,



              check the lable first sudo e2label <device> and rename sudo e2label <device> <label>. Note: 16 characters maximum.



              for more, you should take a look at here.






              share|improve this answer













              You can use Labeling Program for Ubuntu.



              but if you want something with Terminal, try this



              for FAT 12 and 32 Systems, these file systems are most often found on USB thumb drives, flash cards (like for a camera or cell phone), and older external USB hard drives. but may be if your hard disc is FAT 12 or 32 . Thus, check current name in terminal



              sudo mlabel -i <device> -s 


              for example : sudo mlabel -i /dev/sdb1 ::my_external



              if not you edit mtools.conf as sudo



              sudo nano /etc/mtools.conf 


              add something like for each drive:



                 drive p: file="/dev/sdb1"
              drive q: file="/dev/sdb2"


              Then use sudo mlabel p:new_label . for example , sudo mlabel p:30GB_FAT32



              If your HD is in NTFS ,



              first, check the current label sudo ntfslabel <device>



              and rename like that sudo ntfslabel <device> <label> Note: 128 characters maximum.



              most of linux formatted HD are with ext3, ext4 . thus,



              check the lable first sudo e2label <device> and rename sudo e2label <device> <label>. Note: 16 characters maximum.



              for more, you should take a look at here.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Apr 8 '10 at 9:32









              Ye Lin AungYe Lin Aung

              5,10462732




              5,10462732

























                  1














                  You can change the label of the partition. This is the name usually given to new drives appearing in /media. For this you need to edit the partition table, I would suggest you install gparted with the package manager and us that. Be careful what you do with that tool, it can destroy all your data.






                  share|improve this answer
























                  • thanks. how about how to change UUID?

                    – Vytas
                    Apr 8 '10 at 9:28
















                  1














                  You can change the label of the partition. This is the name usually given to new drives appearing in /media. For this you need to edit the partition table, I would suggest you install gparted with the package manager and us that. Be careful what you do with that tool, it can destroy all your data.






                  share|improve this answer
























                  • thanks. how about how to change UUID?

                    – Vytas
                    Apr 8 '10 at 9:28














                  1












                  1








                  1







                  You can change the label of the partition. This is the name usually given to new drives appearing in /media. For this you need to edit the partition table, I would suggest you install gparted with the package manager and us that. Be careful what you do with that tool, it can destroy all your data.






                  share|improve this answer













                  You can change the label of the partition. This is the name usually given to new drives appearing in /media. For this you need to edit the partition table, I would suggest you install gparted with the package manager and us that. Be careful what you do with that tool, it can destroy all your data.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 8 '10 at 9:23









                  Benjamin BannierBenjamin Bannier

                  13.1k23737




                  13.1k23737













                  • thanks. how about how to change UUID?

                    – Vytas
                    Apr 8 '10 at 9:28



















                  • thanks. how about how to change UUID?

                    – Vytas
                    Apr 8 '10 at 9:28

















                  thanks. how about how to change UUID?

                  – Vytas
                  Apr 8 '10 at 9:28





                  thanks. how about how to change UUID?

                  – Vytas
                  Apr 8 '10 at 9:28











                  1














                  In Ubuntu 13.04, you can use the native "e2label" from terminal.



                  Steps:





                  1. list the disks to see which is the one you want to change:



                    sudo fdisk -l



                  2. change the disk name:



                    sudo e2label /dev/sdb1 "mydiskname"







                  share|improve this answer






























                    1














                    In Ubuntu 13.04, you can use the native "e2label" from terminal.



                    Steps:





                    1. list the disks to see which is the one you want to change:



                      sudo fdisk -l



                    2. change the disk name:



                      sudo e2label /dev/sdb1 "mydiskname"







                    share|improve this answer




























                      1












                      1








                      1







                      In Ubuntu 13.04, you can use the native "e2label" from terminal.



                      Steps:





                      1. list the disks to see which is the one you want to change:



                        sudo fdisk -l



                      2. change the disk name:



                        sudo e2label /dev/sdb1 "mydiskname"







                      share|improve this answer















                      In Ubuntu 13.04, you can use the native "e2label" from terminal.



                      Steps:





                      1. list the disks to see which is the one you want to change:



                        sudo fdisk -l



                      2. change the disk name:



                        sudo e2label /dev/sdb1 "mydiskname"








                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Oct 17 '13 at 2:11









                      Scott

                      16.2k113990




                      16.2k113990










                      answered Oct 17 '13 at 0:51









                      AutoCiudadAutoCiudad

                      1111




                      1111























                          0














                          For XFS: xfs_admin -L NEWLABEL /dev/sda1



                          For JFS: jfs_tune /dev/sda2 -L NEWLABEL



                          For ReiserFS: reiserfstune /dev/sda2 -l NEWLABEL



                          Partitions must be umounted and has to be executed by root.






                          share|improve this answer




























                            0














                            For XFS: xfs_admin -L NEWLABEL /dev/sda1



                            For JFS: jfs_tune /dev/sda2 -L NEWLABEL



                            For ReiserFS: reiserfstune /dev/sda2 -l NEWLABEL



                            Partitions must be umounted and has to be executed by root.






                            share|improve this answer


























                              0












                              0








                              0







                              For XFS: xfs_admin -L NEWLABEL /dev/sda1



                              For JFS: jfs_tune /dev/sda2 -L NEWLABEL



                              For ReiserFS: reiserfstune /dev/sda2 -l NEWLABEL



                              Partitions must be umounted and has to be executed by root.






                              share|improve this answer













                              For XFS: xfs_admin -L NEWLABEL /dev/sda1



                              For JFS: jfs_tune /dev/sda2 -L NEWLABEL



                              For ReiserFS: reiserfstune /dev/sda2 -l NEWLABEL



                              Partitions must be umounted and has to be executed by root.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Apr 25 '12 at 5:49









                              lepelepe

                              321413




                              321413























                                  0














                                  Show Applications -> Disks -> select disk to change name -> setting icon -> edit filesystem -> change -> done



                                  img1



                                  img2



                                  img3






                                  share|improve this answer






























                                    0














                                    Show Applications -> Disks -> select disk to change name -> setting icon -> edit filesystem -> change -> done



                                    img1



                                    img2



                                    img3






                                    share|improve this answer




























                                      0












                                      0








                                      0







                                      Show Applications -> Disks -> select disk to change name -> setting icon -> edit filesystem -> change -> done



                                      img1



                                      img2



                                      img3






                                      share|improve this answer















                                      Show Applications -> Disks -> select disk to change name -> setting icon -> edit filesystem -> change -> done



                                      img1



                                      img2



                                      img3







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Jan 30 at 7:16









                                      fixer1234

                                      19.6k145083




                                      19.6k145083










                                      answered Jan 30 at 6:47









                                      Thunder LuuThunder Luu

                                      11




                                      11






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Super User!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f128751%2fhow-can-i-change-the-hard-disk-name-in-ubuntu%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                                          Alcedinidae

                                          RAC Tourist Trophy