Introduction
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
- Go to the Control panel → Programs and click on Programs and Features.
- Click on Turn Windows features on or off and search Telnet Client.
- Select Telnet Client and click on OK button.
![Telnet Client windows feature | Gogo shell in Liferay 7.2 Telnet Client windows feature](https://www.ignek.com/wp-content/uploads/2024/03/Telnet-Client-windows-feature.webp)
- Open your command prompt and Hit the “telnet localhost 11311” command.
![Access localhost via telnet command | Gogo shell in Liferay 7.2 Access localhost via telnet command](https://www.ignek.com/wp-content/uploads/2024/03/Access-localhost-via-telnet-command-1024x590.webp)
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
- Open the PuTTY application.
- Enter your Host Name and Port.
- Select Connection type is “Telnet” and clicks on Open button.
![Useing PuTTY for Telnet connections | Gogo shell in Liferay 7.2 Useing PuTTY for Telnet connections](https://www.ignek.com/wp-content/uploads/2024/03/Useing-PuTTY-for-Telnet-connections.webp)
- If you are connected to the Gogo shell, it will look like below.
![Gogo shell connection depicted in image | Gogo shell in Liferay 7.2 Gogo shell connection depicted in image](https://www.ignek.com/wp-content/uploads/2024/03/Gogo-shell-connection-depicted-in-image.webp)
3. User interface in Liferay 7.2
You can use Liferay portal’s gogo shell user interface from Control Panel →Configuration → Gogo Shell.
![Explore Gogo Shell Interface | Gogo shell in Liferay 7.2 Explore Gogo Shell Interface](https://www.ignek.com/wp-content/uploads/2024/03/Explore-Gogo-Shell-Interface-1024x337.webp)
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 : –
![Installed bundles listed in terminal | Gogo shell in Liferay 7.2 Installed bundles listed in terminal](https://www.ignek.com/wp-content/uploads/2024/03/Installed-bundles-listed-in-terminal-1024x535.webp)
![User interface of Gogo Shell in Liferay | Gogo shell in Liferay 7.2 User interface of Gogo Shell in Liferay](https://www.ignek.com/wp-content/uploads/2024/03/User-interface-of-Gogo-Shell-in-Liferay-1024x587.webp)
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 :
![Information on Specific Bundle ID | Gogo shell in Liferay 7.2 Information on Specific Bundle ID](https://www.ignek.com/wp-content/uploads/2024/03/Information-on-Specific-Bundle-ID-1024x199.webp)
User interface in Liferay :
![Bundle information in GOGO Shell | Gogo shell in Liferay 7.2 Bundle information in GOGO Shell](https://www.ignek.com/wp-content/uploads/2024/03/Bundle-information-in-GOGO-Shell-1024x607.webp)
3. stop [BUNDLE_ID]
Stops the specified bundle.
Terminal :
![Initiate specified bundle in terminal | Gogo shell in Liferay 7.2 Initiate specified bundle in terminal](https://www.ignek.com/wp-content/uploads/2024/03/Initiate-specified-bundle-in-terminal.webp)
User interface in Liferay :
![Liferay UI for terminate bundle | Gogo shell in Liferay 7.2 Liferay UI for terminate bundle](https://www.ignek.com/wp-content/uploads/2024/03/Liferay-UI-for-terminate-bundle-1024x603.webp)
4. start [BUNDLE_ID]
Starts the specified bundle.
Terminal :
![Terminate bundle with specified ID | Gogo shell in Liferay 7.2 Terminate bundle with specified ID](https://www.ignek.com/wp-content/uploads/2024/03/Terminate-bundle-with-specified-ID.webp)
User interface in Liferay :
![Liferay UI for Initiate specified bundle | Gogo shell in Liferay 7.2 Liferay UI for Initiate specified bundle](https://www.ignek.com/wp-content/uploads/2024/03/Liferay-UI-for-Initiate-specified-bundle-1024x592.webp)
5. services
Lists all of the services that have been registered in Liferay’s module framework.
Terminal :
![Terminal showcases registered module services | Gogo shell in Liferay 7.2 Terminal showcases registered module services](https://www.ignek.com/wp-content/uploads/2024/03/Terminal-showcases-registered-module-services-1024x586.webp)
User interface in Liferay :
![Liferay UI for Terminal showcases | Gogo shell in Liferay 7.2 Liferay UI for Terminal showcases](https://www.ignek.com/wp-content/uploads/2024/03/Liferay-UI-for-Terminal-showcases-1024x594.webp)