Do you need to specify the “defaults” option in fstab?
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
add a comment |
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
1
you have to specify defaults as least as place holder, however should you specify anything else (likero
ornosuid
), you can forget default.
– Archemar
Mar 20 '15 at 12:49
add a comment |
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
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
fstab options
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 (likero
ornosuid
), you can forget default.
– Archemar
Mar 20 '15 at 12:49
add a comment |
1
you have to specify defaults as least as place holder, however should you specify anything else (likero
ornosuid
), 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
add a comment |
1 Answer
1
active
oldest
votes
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
edited Dec 7 '17 at 10:51
jringoot
1034
1034
answered Mar 20 '15 at 23:45
GillesGilles
532k12810661592
532k12810661592
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
you have to specify defaults as least as place holder, however should you specify anything else (like
ro
ornosuid
), you can forget default.– Archemar
Mar 20 '15 at 12:49