With bin / karaf, you start Karaf with a login prompt if you want to start Karaf so that you can issue the commands that you first need to run Karaf in server mode. To do this, use the bin / start shell script. Now you can use the bin / client or bin / shell commands to communicate with Karaf in silent mode.
For instance:
./bin/client list START LEVEL 100 , List Threshold: 50 ID | State | Lvl | Version | Name
This should work for all versions of Karaf already (maybe not for version 2.2.x ;-))
If the version you are using is 3.0.x or higher, you may need to add the user to the team.
./bin/client -u karaf list
source share