• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# umount
2
3
4## Command Function
5
6This command is used to unmount a file system.
7
8
9## Syntax
10
11umount [_-a [-t TYPE]_] [_dir_]
12
13
14## Parameters
15
16**Table 1** Parameter description
17
18| Parameter  | Description                                                    | Value Range                  |
19| ------ | ------------------------------------------------------------ | -------------------------- |
20| --help | Displays the parameters supported by the **umount** command.                              | N/A                        |
21| -a     | Unmounts all file systems mounted.                                      | N/A                        |
22| -t     | Used together with the **-a** option to restrict the file systems specified by **-a**, allowing only the file system specified by **-t** to be unmounted.| N/A                        |
23| dir    | Specifies the directory from which the file system is to be unmounted.                              | Directory mounted with the file system|
24
25
26## Usage Guidelines
27
28By specifying the **dir** parameter in the **unmount** command, you can unmount the specified file system.
29
30## Note
31
32The shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
33
34## Example
35
36Run the following commands:
37
38- umount ./nfs
39
40- umount -a -t nfs
41
42
43## Output
44
45
46
47Example 1: Unmount the file system from **./nfs**.
48
49
50```
51OHOS:/$ umount ./nfs/
52umount ok
53```
54
55Example 2: Unmount all NFS directories.
56
57
58```
59OHOS:/$ umount -a -t nfs
60umount ok
61```
62