How To Install ruby-commander on Ubuntu 20.04

In this tutorial we learn how to install ruby-commander on Ubuntu 20.04. ruby-commander is Ruby command-line interface library

Introduction

In this tutorial we learn how to install ruby-commander on Ubuntu 20.04.

What is ruby-commander

ruby-commander is:

“Commander” bridges the gap between other terminal related libraries you know and love (OptionParser, HighLine), while providing many new features, and an elegant API.

Features: * Easier than baking cookies * Parses options using OptionParser * Auto-populates struct with options: ( no more { |v| options[:recursive] = v } ) * Auto-generates help documentation via pluggable help formatters * Optional default command when none is present * Global / Command level options * Packaged with two help formatters (Terminal, TerminalCompact) * Imports the highline gem for interacting with the terminal * Adds additional user interaction functionality * Highly customizable progress bar with intuitive, simple usage * Multi-word command name support * Sexy paging for long bodies of text * Command aliasing * Use the ‘commander’ executable to initialize a commander driven program Ruby-Versions: all

There are three methods to install ruby-commander on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install ruby-commander Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install ruby-commander using apt-get by running the following command:

sudo apt-get -y install ruby-commander

Install ruby-commander Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-commander using apt by running the following command:

sudo apt -y install ruby-commander

Install ruby-commander Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install ruby-commander using aptitude by running the following command:

sudo aptitude -y install ruby-commander

How To Uninstall ruby-commander on Ubuntu 20.04

To uninstall only the ruby-commander package we can use the following command:

sudo apt-get remove ruby-commander

Uninstall ruby-commander And Its Dependencies

To uninstall ruby-commander and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove ruby-commander

Remove ruby-commander Configurations and Data

To remove ruby-commander configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge ruby-commander

Remove ruby-commander configuration, data, and all of its dependencies

We can use the following command to remove ruby-commander configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ruby-commander

References

Summary

In this tutorial we learn how to install ruby-commander package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.