1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:27:34 +00:00

Base: Document mount(2) and mount(8)

This commit is contained in:
Sergey Bugaev 2020-01-11 19:54:48 +03:00 committed by Andreas Kling
parent 0cb0f54783
commit b37bd28053
2 changed files with 95 additions and 0 deletions

View file

@ -0,0 +1,42 @@
## Name
mount - mount a filesystem
## Synopsis
```**sh
$ mount
# mount -a
# mount <source> <target> [-t fstype] [-o options]
```
## Description
If invoked without any arguments, `mount` prints a list of all currently mounted filesystems.
If invoked as `mount -a`, `mount` mounts all the filesystems configured in `/etc/fstab`. This
is normally done on system startup by [`SystemServer`(7)](../man7/SystemServer.md).
Otherwise, `mount` performs a single filesystem mount. Source, target, and fstype have the
same meaning as in the [`mount`(2)](../man2/mount.md) syscall (if not specified, fstype
defaults to `ext2`).
Options correspond to the mount flags, and should be specified as a comma-separated list of
flag names (lowercase and without the `MS_` prefix). Additionally, the name `defaults` is
accepted and ignored.
## Files
* `/etc/fstab` - read by `mount -a` on startup to find out which filesystems to mount.
* `/proc/df` - read by `mount` to get information about mounted filesystems.
## Examples
```sh
# mount devpts /dev/pts -t devpts -o noexec,nosuid
# mount /home/anon/myfile.txt /tmp/foo -o bind
```
## See also
* [`mount`(2)](../man2/mount.md)