Redirects the system console to a specified device or file to be effective on the next startup of the system.
chcons [ -a login { =disable | =enable} ] [ -a console_logname=file ] [ -a console_logsize=size ] [ -a console_logverb=number ] [ -a console_tagverb=number ] PathName
The chcons command changes the system console effective on the next system startup. The current operation of the system console is not affected.
The PathName parameter must be a fully qualified path name to a device or file that is to become the system console.
If the PathName parameter specifies a file that does not exist, the chcons command creates the file at the next system startup. If the file does exist, the chcons command sends any console message output to the file. For a regular file, the system does not start the login program.
If the console path name is a character device, the system starts the login program on the device. Login is enabled on the console at all run levels. If no login is desired, use the -a login=disable flag.
CAUTION: If the console is the only login terminal on the system, you cannot log in at the next start of the system using the -a login=disable flag.
The chcons command saves the specified information into the database to be used on the next start-up of the system with the console configuration method. This method checks the specified device path name to determine if it is a character special file. If it is not, or does not exist, the device path name is assumed to be a file, and the console is set accordingly. If the device path name is a character special file, the console configuration method uses the base name as a logical name and attempts to look up the device name in the device database. If the device is found and available, the console is set to the device.
If the device is not found or is found but not available, a console finder routine is run that displays a prompt requesting that a new system console device be selected. By default, the tty on the S1 port and all graphics displays will display the prompt. The /etc/consdef file must be modified to display the prompt on S2 or other ports.
For a device, an entry in the inittab file with the console identifier is set to the respawn action to allow a login on the console if the console login was specified as the enable parameter. This causes a login to be available at all run levels. If the console login was specified with the disable parameter or if a file is designated as the console, the console entry in the inittab file is set to the OFF action, and login is disabled on the console for all run levels.
chcons /tmp/console.out
chcons /dev/tty3
chcons -a login=enable /dev/tty3
chcons -a login=disable /dev/tty0
chcons /dev/lft0
/dev/console | Specifies the special file for system console access. |
/etc/consdef | Enables non-default terminal to be selected as the console device. |
/usr/sbin/chcons | Specifies the command file. |
The init command, lscons command, swcons command.
The inittab file, consdef file.
The console special file.