From 50edd68b0fff756b77110d282a63b5bb5931c42f Mon Sep 17 00:00:00 2001 From: Marty Penner Date: Thu, 27 Feb 2014 12:05:07 -0500 Subject: [PATCH 1/4] Add pages for the `mount` and `umount` commands --- common/mount.md | 23 +++++++++++++++++++++++ common/umount.md | 16 ++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 common/mount.md create mode 100644 common/umount.md diff --git a/common/mount.md b/common/mount.md new file mode 100644 index 000000000..d26d3743b --- /dev/null +++ b/common/mount.md @@ -0,0 +1,23 @@ +# mount + +> Provides access to an entire filesystem in one directory. + +- Show all mounted filesystems + +`mount` + +- Mount a device + +`mount -t filesystem_type path_to_device_file directory_to_mount_to` + +- Mount a CD-ROM device (with the filetype ISO9660) to /cdrom + +`mount -t iso9660 -o ro /dev/cdrom /cdrom` + +- Mount all the filesystem defined in /etc/fstab + +`mount -a` + +- Mount a specific filesystem described in /etc/fstab (e.g. "/dev/sda1 /my_drive ext2 defaults 0 2") + +`mount /my_drive` diff --git a/common/umount.md b/common/umount.md new file mode 100644 index 000000000..fff1f46aa --- /dev/null +++ b/common/umount.md @@ -0,0 +1,16 @@ +# umount + +> Revokes access to an entire filesystem mounted to a directory. +> A filesystem cannot be unmounted when it is busy. + +- Unmount a filesystem + +`umount path_to_device_file` + +- OR + +`umount path_to_mounted_directory` + +- Unmount all filesystems described in /etc/mtab (dangerous!) + +`umount -a` From 16ea90d99971ca2412d69dc2805fcd0049929080 Mon Sep 17 00:00:00 2001 From: Marty Penner Date: Thu, 27 Feb 2014 12:06:53 -0500 Subject: [PATCH 2/4] Clarify the description for `umount -a` --- common/umount.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/umount.md b/common/umount.md index fff1f46aa..2fe0877d2 100644 --- a/common/umount.md +++ b/common/umount.md @@ -11,6 +11,6 @@ `umount path_to_mounted_directory` -- Unmount all filesystems described in /etc/mtab (dangerous!) +- Unmount all mounted filesystems (dangerous!) `umount -a` From 294da03f40b91c5658e3b590f6061fe002f5c81c Mon Sep 17 00:00:00 2001 From: Marty Penner Date: Thu, 27 Feb 2014 16:02:50 -0500 Subject: [PATCH 3/4] Tokenize user-replaceable values --- common/mount.md | 6 +++--- common/umount.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/mount.md b/common/mount.md index d26d3743b..69ee6620d 100644 --- a/common/mount.md +++ b/common/mount.md @@ -8,11 +8,11 @@ - Mount a device -`mount -t filesystem_type path_to_device_file directory_to_mount_to` +`mount -t {{filesystem_type}} {{path_to_device_file}} {{directory_to_mount_to}}` - Mount a CD-ROM device (with the filetype ISO9660) to /cdrom -`mount -t iso9660 -o ro /dev/cdrom /cdrom` +`mount -t {{iso9660}} -o ro {{/dev/cdrom}} {{/cdrom}}` - Mount all the filesystem defined in /etc/fstab @@ -20,4 +20,4 @@ - Mount a specific filesystem described in /etc/fstab (e.g. "/dev/sda1 /my_drive ext2 defaults 0 2") -`mount /my_drive` +`mount {{/my_drive}}` diff --git a/common/umount.md b/common/umount.md index 2fe0877d2..abe4ad71d 100644 --- a/common/umount.md +++ b/common/umount.md @@ -5,11 +5,11 @@ - Unmount a filesystem -`umount path_to_device_file` +`umount {{path_to_device_file}}` - OR -`umount path_to_mounted_directory` +`umount {{path_to_mounted_directory}}` - Unmount all mounted filesystems (dangerous!) From 627b9d5694e97e4e07ca7383dcb834d5244de499 Mon Sep 17 00:00:00 2001 From: Marty Penner Date: Thu, 27 Feb 2014 16:05:48 -0500 Subject: [PATCH 4/4] Ensure the CD-mounting example description tells the user it will mount readonly --- common/mount.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/mount.md b/common/mount.md index 69ee6620d..9ae5b14aa 100644 --- a/common/mount.md +++ b/common/mount.md @@ -10,7 +10,7 @@ `mount -t {{filesystem_type}} {{path_to_device_file}} {{directory_to_mount_to}}` -- Mount a CD-ROM device (with the filetype ISO9660) to /cdrom +- Mount a CD-ROM device (with the filetype ISO9660) to /cdrom (readonly) `mount -t {{iso9660}} -o ro {{/dev/cdrom}} {{/cdrom}}`