Removes a device from the system.
rmdev -l Name [ -d | -S ] [ -f File ] [ -h ] [ -q ] [ -R ]
The rmdev command unconfigures or both unconfigures and undefines the device specified with the device logical name (the -l Name flag). The default action unconfigures the device while retaining its device definition in the Customized Devices object class.
If you specify the -S flag, the rmdev command sets the device to the Stopped state for devices that support the Stopped state. If you specify the -d flag, the rmdev command deletes the device definition from the Customized Devices object class (undefines). If you do not specify the -d flag, the rmdev command sets the device to the Defined state (unconfigures). If you specify the -R flag, the rmdev command acts on any children of the device as well.
Attention: To protect the Configuration database, the rmdev command is not interruptible. Stopping this command before execution is complete could result in a corrupted database.
You can use the Web-based System Manager Devices application (wsm devices fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit rmdev fast path to run this command.
-d | Removes the device definition from the Customized Devices object class. This flag cannot be used with the -S flag. |
-f File | Reads the needed flags from the File variable. |
-h | Displays the command usage message. |
-l Name | Specifies the logical device, indicated by the Name variable, in the Customized Devices object class. |
-q | Suppresses the command output messages from standard output and standard error. |
-R | Unconfigures the children of the device. When used with the -d or -S flags, the children are undefined or stopped, respectively. |
-S | Makes the device unavailable by only calling the Stop method if the device has a Stop method. This flag cannot be used with the -d flag. |
Privilege Control: Only the root user and members of the system group should have execute (x) access to this command.
Event | Information |
---|---|
DEV_Stop | Device name |
DEV_Unconfigure | Device name |
DEV_Remove | Device name |
rmdev -l cd0The system displays a message similar to the following:
cd0 defined
rmdev -d -l cd0The system displays a message similar to the following:
cd0 deleted
rmdev -l ent0 -SThe system displays a message similar to the following:
ent0 stopped
/usr/sbin/rmdev | Contains the rmdev command. |
The chdev command, lsattr command, lsconn command, lsdev command, lsparent command, mkdev command.
Device Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.
Setting up and running Web-based System Manager in AIX Version 4.3 System Management Guide: Operating System and Devices.
System Management Interface Tool (SMIT): Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.