Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

3.6. The Management CLI Command History

3.6.1. About the Management CLI Command History

The Management CLI features a command history functionality that is enabled by default in the application server installation. The history is kept both as a record in the volatile memory of the active CLI session, and appended to a log file that saves automatically in the user's home directory as .jboss-cli-history. This history file is configured by default to record up to a maximum of 500 CLI commands.
The history command by itself will return the history of the current session, or with additional arguments will disable, enable or clear the history from the session memory. The Management CLI also features the ability to use your keyboard's arrow keys to go back and forth in the history of commands and operations.

3.6.2. View Management CLI Command History

Procedure 3.20. View the Management CLI Command History

  • Run the history command

    From the Management CLI, enter the history command:
    [standalone@localhost:9999 /] history
Result

The CLI command history stored in memory since the CLI startup or the history clear command is displayed.

3.6.3. Clear the Management CLI Command History

Procedure 3.21. Clear the Management CLI Command History

  • Run the history --clear command

    From the Management CLI, enter the history --clear command:
    [standalone@localhost:9999 /] history --clear
Result

The history of commands recorded since the CLI startup is cleared from the session memory. The command history is still present in the .jboss-cli-history file saved to the user's home directory.

3.6.4. Disable the Management CLI Command History

Procedure 3.22. Disable the Management CLI Command History

  • Run the history --disable command

    From the Management CLI, enter the history --disable command:
    [standalone@localhost:9999 /] history --disable
Result

Commands made in the CLI will not be recorded either in memory or in the .jboss-cli-history file saved to the user's home directory.

3.6.5. Enable the Management CLI Command History

Procedure 3.23. Enable the Management CLI Command History

  • Run the history --enable command

    From the Management CLI, enter the history --enable command:
    [standalone@localhost:9999 /] history --enable
Result

Commands made in the CLI are recorded in memory and in the .jboss-cli-history file saved to the user's home directory.