# eject

用来退出抽取式设备

## 补充说明

**eject命令** 用来退出抽取式设备。若设备已挂入，则eject命令会先将该设备卸除再退出。

eject允许可移动介质（典型是cd-ROM、软盘、磁带、或者JAZ以及zip磁盘）在软件控制下弹出。该命令也可以控制一些多盘片CD-ROM控制器，控制一些设备支持的自动弹出功能，以及控制一些CD-ROM驱动器磁盘托盘的关闭。与name相应的设备将被弹出，name可以为设备文件或者其挂载点，也可以为完整路径或者省略前面的/dev或者/mnt设备文件名。如果没有指定name，缺省使用cdrom。

有四种不同的弹出的方法，具体要看设备是CD-ROM， SCSI设备，可移动软盘，还是磁带而定。默认的弹出会依次尝试所有四种方法，直到成功为止。如果设备当前是挂载上来的，那么在弹出前要先卸载。

### 语法

```
eject(选项)(参数)
```

### 选项

```
-a<开关>或--auto<开关>：控制设备的自动退出功能；
-c<光驱编号>或--changerslut<光驱编号>   选择光驱柜中的光驱；
-d或--default：显示预设的设备，而不是实际执行动作；
-f或--floppy：退出抽取式磁盘；
-h或--help：显示帮助；
-n或--noop：显示指定的设备；
-q或--tape：退出磁带；
-r或--cdrom：退出光盘；
-s或--scsi：以SCSI指令来退出设备；
-t或--trayclose：关闭光盘的托盘；
-v或--verbose：执行时，显示详细的说明。
```

### 参数

设备名：指定弹出的设备名称。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hezhiqiang.gitbook.io/linux/ming-ling/eject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
