Do you need to specify the “defaults” option in fstab?












12















The Arch Wiki on fstab specifies the options of / to be defaults,noatime, but on my installation the default fstab is created with the options of rw,relatime. The Arch Wiki covers the atime issues. What I am curious about is the defaults option. The man page for mount says:




defaults



Use the default options: rw, suid, dev, exec, auto, nouser, and async.



Note that the real set of all default mount options depends on kernel and filesystem type. See the beginning of this section for more details.




Are the default options used only if the defaults option is provided or are they used in all cases? Do I need defaults in my fstab?










share|improve this question


















  • 1





    you have to specify defaults as least as place holder, however should you specify anything else (like ro or nosuid), you can forget default.

    – Archemar
    Mar 20 '15 at 12:49
















12















The Arch Wiki on fstab specifies the options of / to be defaults,noatime, but on my installation the default fstab is created with the options of rw,relatime. The Arch Wiki covers the atime issues. What I am curious about is the defaults option. The man page for mount says:




defaults



Use the default options: rw, suid, dev, exec, auto, nouser, and async.



Note that the real set of all default mount options depends on kernel and filesystem type. See the beginning of this section for more details.




Are the default options used only if the defaults option is provided or are they used in all cases? Do I need defaults in my fstab?










share|improve this question


















  • 1





    you have to specify defaults as least as place holder, however should you specify anything else (like ro or nosuid), you can forget default.

    – Archemar
    Mar 20 '15 at 12:49














12












12








12


3






The Arch Wiki on fstab specifies the options of / to be defaults,noatime, but on my installation the default fstab is created with the options of rw,relatime. The Arch Wiki covers the atime issues. What I am curious about is the defaults option. The man page for mount says:




defaults



Use the default options: rw, suid, dev, exec, auto, nouser, and async.



Note that the real set of all default mount options depends on kernel and filesystem type. See the beginning of this section for more details.




Are the default options used only if the defaults option is provided or are they used in all cases? Do I need defaults in my fstab?










share|improve this question














The Arch Wiki on fstab specifies the options of / to be defaults,noatime, but on my installation the default fstab is created with the options of rw,relatime. The Arch Wiki covers the atime issues. What I am curious about is the defaults option. The man page for mount says:




defaults



Use the default options: rw, suid, dev, exec, auto, nouser, and async.



Note that the real set of all default mount options depends on kernel and filesystem type. See the beginning of this section for more details.




Are the default options used only if the defaults option is provided or are they used in all cases? Do I need defaults in my fstab?







fstab options






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 20 '15 at 11:30









StrongBadStrongBad

2,19462654




2,19462654








  • 1





    you have to specify defaults as least as place holder, however should you specify anything else (like ro or nosuid), you can forget default.

    – Archemar
    Mar 20 '15 at 12:49














  • 1





    you have to specify defaults as least as place holder, however should you specify anything else (like ro or nosuid), you can forget default.

    – Archemar
    Mar 20 '15 at 12:49








1




1





you have to specify defaults as least as place holder, however should you specify anything else (like ro or nosuid), you can forget default.

– Archemar
Mar 20 '15 at 12:49





you have to specify defaults as least as place holder, however should you specify anything else (like ro or nosuid), you can forget default.

– Archemar
Mar 20 '15 at 12:49










1 Answer
1






active

oldest

votes


















14














You only need defaults if the field would otherwise be empty.



You can leave out the options field altogether if it's empty, unless the 5th or 6th fields are present. Field 5 is the dump frequency, rarely used nowadays. Field 6 fsck order, should be 1 for /, 2 for other filesystems mounted on boot and 0 otherwise. Fields 5 and 6 can be omitted if their value is 0, except that field 5 needs to be present if field 6 is.



Thus defaults is necessary in



/dev/foo /foo somefs defaults 0 1


(though you can use some other option like rw or ro instead)



But it can be omitted when you specify another option.



eg: The mounts below have the same effect.



/dev/foo /foo somefs ro            0 1
/dev/foo /foo somefs defaults,ro 0 1


But these also have the same effect.



/dev/foo /foo somefs defaults      0 0
/dev/foo /foo somefs





share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f191405%2fdo-you-need-to-specify-the-defaults-option-in-fstab%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    14














    You only need defaults if the field would otherwise be empty.



    You can leave out the options field altogether if it's empty, unless the 5th or 6th fields are present. Field 5 is the dump frequency, rarely used nowadays. Field 6 fsck order, should be 1 for /, 2 for other filesystems mounted on boot and 0 otherwise. Fields 5 and 6 can be omitted if their value is 0, except that field 5 needs to be present if field 6 is.



    Thus defaults is necessary in



    /dev/foo /foo somefs defaults 0 1


    (though you can use some other option like rw or ro instead)



    But it can be omitted when you specify another option.



    eg: The mounts below have the same effect.



    /dev/foo /foo somefs ro            0 1
    /dev/foo /foo somefs defaults,ro 0 1


    But these also have the same effect.



    /dev/foo /foo somefs defaults      0 0
    /dev/foo /foo somefs





    share|improve this answer






























      14














      You only need defaults if the field would otherwise be empty.



      You can leave out the options field altogether if it's empty, unless the 5th or 6th fields are present. Field 5 is the dump frequency, rarely used nowadays. Field 6 fsck order, should be 1 for /, 2 for other filesystems mounted on boot and 0 otherwise. Fields 5 and 6 can be omitted if their value is 0, except that field 5 needs to be present if field 6 is.



      Thus defaults is necessary in



      /dev/foo /foo somefs defaults 0 1


      (though you can use some other option like rw or ro instead)



      But it can be omitted when you specify another option.



      eg: The mounts below have the same effect.



      /dev/foo /foo somefs ro            0 1
      /dev/foo /foo somefs defaults,ro 0 1


      But these also have the same effect.



      /dev/foo /foo somefs defaults      0 0
      /dev/foo /foo somefs





      share|improve this answer




























        14












        14








        14







        You only need defaults if the field would otherwise be empty.



        You can leave out the options field altogether if it's empty, unless the 5th or 6th fields are present. Field 5 is the dump frequency, rarely used nowadays. Field 6 fsck order, should be 1 for /, 2 for other filesystems mounted on boot and 0 otherwise. Fields 5 and 6 can be omitted if their value is 0, except that field 5 needs to be present if field 6 is.



        Thus defaults is necessary in



        /dev/foo /foo somefs defaults 0 1


        (though you can use some other option like rw or ro instead)



        But it can be omitted when you specify another option.



        eg: The mounts below have the same effect.



        /dev/foo /foo somefs ro            0 1
        /dev/foo /foo somefs defaults,ro 0 1


        But these also have the same effect.



        /dev/foo /foo somefs defaults      0 0
        /dev/foo /foo somefs





        share|improve this answer















        You only need defaults if the field would otherwise be empty.



        You can leave out the options field altogether if it's empty, unless the 5th or 6th fields are present. Field 5 is the dump frequency, rarely used nowadays. Field 6 fsck order, should be 1 for /, 2 for other filesystems mounted on boot and 0 otherwise. Fields 5 and 6 can be omitted if their value is 0, except that field 5 needs to be present if field 6 is.



        Thus defaults is necessary in



        /dev/foo /foo somefs defaults 0 1


        (though you can use some other option like rw or ro instead)



        But it can be omitted when you specify another option.



        eg: The mounts below have the same effect.



        /dev/foo /foo somefs ro            0 1
        /dev/foo /foo somefs defaults,ro 0 1


        But these also have the same effect.



        /dev/foo /foo somefs defaults      0 0
        /dev/foo /foo somefs






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 7 '17 at 10:51









        jringoot

        1034




        1034










        answered Mar 20 '15 at 23:45









        GillesGilles

        532k12810661592




        532k12810661592






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f191405%2fdo-you-need-to-specify-the-defaults-option-in-fstab%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

            Morgemoulin

            Scott Moir

            Souastre