Adds a device to the system.
mkdev { -c Class -s Subclass -t Type } [ -l Name ] [ -a Attribute=Value ] ... [ -d | -S | -R ] [ -f File ] [ -h ] [ -p ParentName ] [ -q ] [ -w ConnectionLocation ]
mkdev -l Name [ -h ] [ -q ] [ -S ]
Attention: To protect the Configuration Database, the mkdev command is not interruptible. Stopping this command before execution is complete could result in a corrupted database.
The mkdev command either defines and makes available a device with the given device class (-c Class flag), type (-t Type flag), subclass (-s Subclass flag), connection location (-w ConnectionLocation flag), and the device logical name of the parent (-p ParentName flag), or makes available the previously defined device specified by the given device logical name (-l Name flag). You can use any combination of the -c, -s, and -t flags needed to uniquely identify the predefined device.
If you specify the -d flag, the mkdev command only defines the device. If you specify the -S flag, the mkdev command brings the device to the Stopped state, if this state is supported, and does not make the device available. If you do not specify either the -d flag or the -S flag, the mkdev command makes the device available.
If you specify the -R flag, the mkdev command configures any parents of the specified device that are not already configured. Parents must be previously defined. The -R flag is not compatible with the -d and -S flags.
By using the -l flag with the -c, -s, and -t flags, you can specify the name you want the device to be known by. If you do not use the -l flag, a name will be automatically generated and assigned. Not all devices support user-supplied names.
Note: Queue device names must begin with an alphabetic character.
When using the mkdev command, you can supply the flags either on the command line or from the specified File parameter.
You can use the Devices application in Web-based System Manager (wsm) to change device characteristics.
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 mkdev fast path to run this command.
-a Attribute=Value | Specifies the device attribute value pairs to be used instead of the defaults. The Attribute=Value variable can be used to specify one attribute value pair or multiple attribute value pairs for one -a flag. If you use an -a flag with multiple attribute value pairs, the list of pairs must be enclosed in quotation marks with a blank space between the pairs. For example, entering -a Attribute=Value lists one attribute value pair per flag, while entering -a 'Attribute1=Value1 Attribute2=Value2' lists more than one attribute value pair. This flag cannot be used with the -l flag unless the -c, -s, and -t flags are also used. |
-c Class | Specifies the device class. |
-d | Defines the device in the Customized Devices object class. If you specify the -d flag, the mkdev command does not make the device available. This flag cannot be used with the -S flag. |
-f File | Reads the needed flags from the File parameter. |
-h | Displays the command usage message. |
-l Name | Specifies the already defined device, indicated by the Name variable, in the Customized Devices object class when not used with the -c, -s, and -t flags. The -a, -p, and -w flags cannot be used in this case. Queue device names must begin with an alphabetic character. |
-p ParentName | Specifies the device name, indicated by the ParentName variable, that you want assigned to the device when used with the -c, -s, and -t flags. Not all devices support this feature. This flag cannot be used with the -l flag unless the -c, -s, and -t flags are also used. |
-q | Suppresses the command output messages from standard output and standard error. |
-R | Configures any parents of the device that are not already configured. This flag is not compatible with the -d and -S flags. |
-S | Prevents the device from being set to the Available state. This flag is only meaningful for those devices that support the Stopped state. This flag cannot be used with the -d flag. |
-s Subclass | Specifies the subclass, indicated by the Subclass variable, of the device. |
-t Type | Specifies the device type from the Predefined Devices object class. |
-w ConnectionLocation | Specifies the connection location, indicated by the ConnectionLocation variable, on the parent. This flag cannot be used with the -l flag unless the -c, -s, and -t flags are also used. |
Privilege Control: Only the root user and members of the system group should have execute (x) access to this command.
Auditing Events:
Event | Information |
---|---|
DEV_Create | Method name, parameters |
DEV_Configure | Errors |
DEV_Start | Device name |
DEV_Change | Parameters |
rmt0 defined
rmt0 available
tty0 available
/usr/sbin/mkdev | Contains the mkdev command. |
The chdev command, lsattr command, lsconn command, lsdev command, lsparent command, rmdev command.
Device Overview for System Management in the AIX 5L Version 5.2 System Management Guide: Operating System and Devices.
For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.2 Web-based System Manager Administration Guide.
System Management Interface Tool (SMIT): Overview in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.