Device allocation must be enabled, as described in How to Make a Device Allocatable. If authorization is required, the user must have the authorization.
Allocate the device.
Specify the device by device name.
% allocate device-name |
Verify that the device is allocated.
Run the identical command.
% allocate device-name allocate. Device already allocated. |
In this example, the user jdoe allocates a microphone, audio.
% whoami jdoe % allocate audio |
In this example, a user allocates a printer. No one else can print to printer-1 until the user deallocates it, or until the printer is forcibly allocated to another user.
% allocate /dev/lp/printer-1 |
For an example of forcible deallocation, see Forcibly Deallocating a Device.
In this example, the user jdoe allocates a tape drive, st0.
% whoami jdoe % allocate st0 |
If the allocate command cannot allocate the device, an error message is displayed in the console window. For a list of allocation error messages, see the allocate(1) man page.