Commands to mount partitions easily using fstab

We open the terminal and execute the following command:

sudo nano / etc / fstab

then we edit adding the partition or disk that we want, they can be guided with the following image:

As you can see in the image, you have to put the following information to get it to be mounted automatically:

UUID = 6012F3DE12F3B6DE / home / azavenom / MakubeX auto defaults 0 0

As you can see, put the disk id first UUID = "ID" without quotes

to get the id, the first thing they will do is mount it manually as they always do by going to their file manager and entering that partition / disk after they have done this they will enter the partition manager that they have, be it gpated (gnome) or kde partition manager (kde) in my case I will do it using kde partition manager if you do not have it installed you can easily find it in the application manager of your distro.

As you can see in the image, the ones with the lock are that they are already mounted, now they will only right-click the partition that we mounted to get the ID and we go to properties.

How do you see that information UUID is what we will need A clarification, the length of the id varies according to the type of partition and disk. In this case, as in the root "/" of the system it has that long id but the ones that we are going to mount will perhaps have a much shorter id.

Well continuing with the following will be to put in the fstab system the data that I previously mentioned

UUID = 6012F3DE12F3B6DE / home / azavenom / MakubeX auto defaults 0 0

As they see xD in we have placed the ID corresponding to the partition / disk then in It is where we will specify where we want it to be mounted in this case, first I have created a folder inside my personal folder with the name MakubeX where the partition I want will be mounted, Here is to specify the type of partition, in this case it is best to leave it in "car" (without quotes xD), in this column we leave it with the option "defaults " (without quotes xD) then in and we put them 0 0 With all this, the changes are saved with the following keys: Ctrl + A and to go out Ctrl + X.

Ready and the most important thing they have done, it only remains to check that everything has gone well and for that we will do the following:

again in the terminal we will put the following to disassemble everything we have:

sudo umount -a

And we remount with the following command

sudo mount -a

Ready if everything went well they will have the partition mounted in the directory they have chosen

Greetings!!


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   auroszx said

    Good article, you should add that in you don't have to use the UUID necessarily, but you can also use the partition label or its number (/ dev / sda1 for example).

  2.   Andrex said

    Guys what's wrong? All the reports they present are like a glove; They are great!!!!! Thank you very much and keep well. I hope that at some point they present a git tutorial for those of us who "don't understand anything" hahaha. A hug

    1.    KZKG ^ Gaara said

      In fact I have recently learned to use Git ... it is not as complex as I thought, which I still don't dare to do a tutorial hehe.

  3.   Neo61 said

    Contra, you really simplify a lot of things, very good. Thank you

  4.   Neo61 said

    One question, I use ubuntu although now I am on windows for work, I have always wanted to look for the option that the disks are mounted on the desktop automatically, that is, I do not have to load them manually as until now I have had to do what It is sometimes tedious because for example, if I have the repo on a disk x and I want to install a program through the Terminal it will give me an error because that disk does not appear mounted until it is clicked. Could someone help me with a solution, it may be easier than I think, but I just haven't found it.

    1.    makubex uchiha said

      hello friend xD what you can do is first create a folder on the desktop where the data of the disk to be mounted will be found inside, you can go directly to your personal folder and enter desktop, / home / yourname / desktop / folder-to-mount -disco so more times it would be then in fstab you put the address so that it is mounted automatically where specified on the desktop.

  5.   KZKG ^ Gaara said

    Excellent post 😀

    1.    makubex uchiha said

      Thank you men xD

  6.   jackassbq said

    The UUID can also be obtained by typing in the terminal the following: $ sudo blkid, at least for me it is easier that way 😛

    Greetings and excellent post.

    1.    KZKG ^ Gaara said
  7.   Neo61 said

    makubex uchiha
    Thanks for the information, in a while I'm going to try, and I'll tell you

    1.    makubex uchiha said

      You are welcome, I hope it will be of good use to you xD if you need any help let me know xD

  8.   msx said

    KPartManager !!? Tremendous WTF, I haven't seen it in a long time, a real relic since its development has been discontinued for a long time, what version of KDE SC are you using?

    [blkid - locate / print block device attributes]
    There is a faster and easier way to see the universal unique udentifier of c / partition or block device attached to the system:
    #blkid
    /dev/sda2: UUID=»fceab84d-00b2-4eb8-d2bd-269cf1e5aabc» TYPE=»ext4″
    /dev/sda3: UUID=»a72cc8a8-332b-46ad-8a0a-94175873c7ef» TYPE=»swap»
    /dev/sda4: UUID=»e17af72e-42c2-43c9-80b7-82e525fedf1b» TYPE=»ext4

    Some distros do not install this application automatically, look for it in the repos.

    1.    makubex uchiha said

      hello xD I am using the kde 4.8 version in manjaro linux based on archlinux hehehe and thanks for the data xD

  9.   Neo61 said

    makubex uchiha,
    Do you know something friend? I only did a few steps, I did not have to create the folder, I only put in fstab the address of the disk that I wanted to be loaded following the example that AurosZx put at the beginning of these comments, I saved and exited, then I applied the command sudo umount -ay then mount -a, when I applied the latter it gave me an error but I restarted the PC and…. abracadabra, there was on the desk the disk that I wanted to be loaded automatically…. nothing, things from the Orinoco ……. Tell me something Fernández !!!!!

    1.    makubex uchiha said

      hehehe first xD who is Fernandez? 😛 well, the method that AurosZx says works the same hehe only I did it this way to make it longer 😛 na ._. in itself when I did the tutorial I only knew the way with the UUID: - / but good. at least they will be useful for those who need to do it either with the partition manager or from the terminal, in my case use this to look for the UUID from the partition manager for those who are not so used to the terminal can do it in graphical mode . in itself try to make the tutorial as simple and explanatory as possible for noobs in linux so that they only do a few steps in the terminal.

  10.   FISH37 said

    I understand why you are here. Sure, your tutorials are very good and by the way I understand that this is for Linux OS, Too bad we are enslaved and afraid to leave W7, keep it up man, you're great.

  11.   Miguel said

    Great article with accurate information. Thanks a thousand.

    Butoo
    A grammatical comment, you do not have to publish it but you do correct it.
    to find is to find and there is from the verb to have

    and entering that partition / disk after they have done this they will enter
    and entering that partition / disk after they have done this they will enter

    It only remains to check that everything has gone well
    It only remains to check that everything has gone well

  12.   q92 helea said

    The images can not be seen. Neither in FIREFOX nor Chrome