Install GoTTY on Ubuntu 20.04

Install GoTTY on Ubuntu 20.04

GoTTY is a tool which allows to share terminal in the browser. It converts command line tools into web applications. GoTTY is written in Go programming language.

This tutorial shows how to install GoTTY on Ubuntu 20.04.

Install GoTTY

Download the latest GoTTY release from GitHub:

wget -qO gotty.tar.gz

Extract tar.gz file to /usr/local/bin directory:

sudo tar xf gotty.tar.gz -C /usr/local/bin

Now GoTTY can be used as a system-wide command for all users.

We can check GoTTY version as follows:

gotty --version

The tar.gz file is no longer needed, we can remove it:

rm -rf gotty.tar.gz

Testing GoTTY

Run GoTTY with your desired command using the following syntax:

gotty <COMMAND>

The <COMMAND> is a name of the command that will be shared in the browser. For example, we can display currently running processes on system using top command as a web application.

gotty top

GoTTY starts a web server and prints URL. By default, a server is listening on a port 8080. Open a web browser and navigate to given URL to view output of the command.

Share terminal using GoTTY on Ubuntu

By default, GoTTY doesn't require any authentication for clients. We can enable HTTP basic authentication with --credential option. When client opens URL, he need to enter the username and password to connect to the server.

gotty --credential admin:mypass top

Uninstall GoTTY

If you want to completely remove GoTTY, delete executable file:

sudo rm -rf /usr/local/bin/gotty

Leave a Comment

Cancel reply

Your email address will not be published.