Reputation: 464
I'm trying to mount the partition /dev/sda4 like this:
sudo mount /dev/sda4
My /etc/fstab has this line:
/dev/sda4 /home/lv/Media ext4 defaults 0 2
But still when I use mount
I get this:
/dev/sda4 on /home/lv/Media type ext4 (rw)
I read defaults should be equal to rw, suid, dev, exec, auto, nouser, async, and relatime. What's the deal with this?
Upvotes: 1
Views: 313
Reputation: 4883
From fstab(5):
defaults
use default options: rw, suid, dev, exec, auto, nouser, and async.
I believe, all these options are default behaviour and thus not shown explicitly (one exception is rw
). If nosuid
is not given, mount defaults to suid
; if nodev
is not given, mount defaults to dev
, and so on.
For example, noexec
option is shown:
$ mount /dev/sda1 foo -o noexec
$ ./foo/bin/date
zsh: permission denied: ./foo/bin/date
$ mount | grep foo
/dev/sda1 on /root/foo type ext4 (rw,noexec)
But exec
option is not:
$ mount /dev/sda1 foo -o exec
$ ./foo/bin/date
Tue Jul 28 08:58:36 MSK 2015
$ mount | grep foo
/dev/sda1 on /root/foo type ext4 (rw)
Upvotes: 1