Gogo Shell provides the command line interface to manage bundles in the OSGi container. We can use the Gogo shell to connect with OSGi bundles. Also, we manage change lifecycle like install bundles, start bundles, stop bundles and uninstall bundles.

There are following ways to connect with Gogo Shell in Liferay 7.X as below :-

  • Telnet
  • PuTTY
  • User interface in Liferay Portal
  • Blade CLI

Note: If you want to connect gogo shell, You must have enabled developer mode in your Liferay server. 

To enable developer mode, add below property in portal-ext.properties and restart your Liferay server.

include-and-override=portal-developer.properties

1. Telnet

We can use Gogo Shell to connect with Liferay’s module framework by using client telnet. Follow the below step for the telnet client.

  • For Windows
    1. Go to the Control panel Programs and click on Programs and Features.
    2. Click on Turn Windows features on or off and search Telnet Client.
    3. Select Telnet Client and click on OK button.
Gogo shell in Liferay 7.2
    1. Open your command prompt and Hit the “telnet localhost 11311” command.
Gogo shell in Liferay 7.2

2. PuTTY

PuTTY is an open-source terminal that supports different protocols like SSH and Telnet. The following are the steps to connect Felix Gogo shell from PuTTY in Liferay 7.x

  1. Open the PuTTY application.
  2. Enter your Host Name and Port.
  3. Select Connection type is “Telnet” and clicks on Open button.
Gogo shell in Liferay 7.2
  1. If you are connected to the Gogo shell, it will look like below.
Gogo shell in Liferay 7.2

3. User interface in Liferay 7.2 

You can use Liferay portal’s gogo shell user interface from Control PanelConfigurationGogo Shell.

Gogo shell in Liferay 7.2

4. Blade CLI

You can also execute Gogo shell commands from Blade CLI.

blade sh <gogo Shell Command>

Gogo shell commands example

1. lb :

It lists out all the installed bundles.

Terminal : –

Gogo shell in Liferay 7.2

User interface in Liferay : –

Gogo shell in Liferay 7.2
2. bundle [BUNDLE_ID]

Lists information about a specific bundle including the bundle’s symbolic name, bundle ID, data root, registered and used services, imported and exported packages, and more.

Terminal : –

Gogo shell in Liferay 7.2

User interface in Liferay : –

Gogo shell in Liferay 7.2
3. stop [BUNDLE_ID]

Stops the specified bundle.

Terminal : –

Gogo shell in Liferay 7.2

User interface in Liferay : –

Gogo shell in Liferay 7.2
4. start [BUNDLE_ID]

Starts the specified bundle.

Terminal : –

Gogo shell in Liferay 7.2

User interface in Liferay : –

Gogo shell in Liferay 7.2
5. services

Lists all of the services that have been registered in Liferay’s module framework.

Terminal : –

Gogo shell in Liferay 7.2

User interface in Liferay : –

Gogo shell in Liferay 7.2

Visit Gogo shell commands to learn more about other useful commands.