「-o defaults」の現在のデフォルトの「mount」オプションセットをどのように確認できますか?

「-o defaults」の現在のデフォルトの「mount」オプションセットをどのように確認できますか?

man mount、、、、、およびの-o defaultsデフォルトmountオプションセットを含むと説明されています。rwsuiddevexecautonouserasync

mountシステムカーネルで有効/無効にするオプションは、デフォルトの-o defaultsオプションセットに追加/削除されますかmount?ファイルシステム固有のデフォルトオプションにも同様に適用されますか?

-o defaultsチェックで現在のデフォルトオプションセットをどのように確認できますか?単に現在マウントされているすべてのファイルシステムを一覧表示します。mount/proc/mounts

man mount

FILESYSTEM-INDEPENDENT MOUNT OPTIONS
       Some of  these  options  are  only  useful  when  they  appear  in  the
       /etc/fstab file.

       Some  of  these  options could be enabled or disabled by default in the
       system kernel.  To  check  the  current  setting  see  the  options  in
       /proc/mounts.   Note that filesystems also have per-filesystem specific
       default mount options (see for  example  tune2fs  -l  output  for  extN
       filesystems).

        ...

        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.

ベストアンサー1

ただmount出力を確認しますか?

たとえば、与えられた~/tmpfileファイルからext4ファイルシステムを作成します。

~$ sudo mount -t ext4 -o defaults tmpfile /media/cdrom
~$ mount|grep /media/cdrom
tmpfile on /media/cdrom0 type ext4 (rw,relatime)

おすすめ記事