Karaf console commands Cheat Sheet
This page serves as a cheat sheet with frequently used Karaf console commands, i.e. the descriptions are intentionally kept compact. Commands of particular interest are in bold. Detailed documentation under Apache Karaf Container 4.x - Documentation or Karaf console commands for the BPC.
General
| Command | Description |
|---|---|
|
Terminates the current Karaf console session |
|
Terminates and restarts Karaf (not OpenSearch) |
|
The tab key lists possible commands, subshells etc., or for a subshell its commands (e.g. bpc:<TAB-Taste>), or for a command the options.
The name does not have to be typed in completely and is automatically completed if it is unique - for example, the input |
|
Help for the command. |
|
Executes the command of the specified subshell. |
|
Switches to the specified subshell (from the parent shell or any subshell) and executes the command. |
|
Exits the subshell and returns to the parent shell. |
List, install, stop Karaf bundles, etc.
| Command | Description |
|---|---|
|
Show installed bundles and their status |
|
Show installed bundles whose line does not contain "active" (-v), ignore upper/lower case (-i) |
|
Stop the bundle with the specified ID (can be determined via list) |
|
Restart the bundle with the specified ID (can be determined via list) |
|
Installs a feature, e.g. |
|
Installs and starts an OSGi bundle, typically with URL pattern mvn:my/bundle/1.0 |
|
Uninstalls an OSGi bundle |
Information about the system
| Command | Description |
|---|---|
|
Shows the last 50 log entries |
|
Shows the last [20] log entries and then the new entries as they are added. |
|
Shows newly added log entries that contain the search term. |
|
Shows important system information, e.g. in which path it is installed. Useful if you use SSH access and therefore do not know where the instance you have connected to is installed. |
|
Shows the value of system properties.
Examples of |
|
Version of Karaf |
|
Creates a ZIP file with comprehensive information for problem analysis, which is required for support requests, for example. |
Manage Karaf users
These are not necessarily identical to the end users who log in to BPC via browser, e.g. with INUBIT as identity provider.
| Command | Description |
|---|---|
|
Listing of the realms to find out the correct realm - often realm 3 is the one for |
|
Switch to the realm you want to work with |
|
Check the users and Karaf roles in the realm |
|
Create the user |
|
Give the user |
|
Save changes |
BPC commands
See also Karaf console commands for the BPC.