All     Ethical Hacking     Networking     Programming     OSINT

Ruby in Termux – Installation & Basic Commands

Ruby is a simple and powerful scripting language used for web development, automation, and fast prototyping. Termux allows you to install Ruby directly on your Android device so you can run scripts and explore Ruby programming easily. Below are the installation steps and basic commands to help you get started.

Installation

Update all Termux packages:

pkg update && pkg upgrade -y

Install Ruby:

pkg install ruby -y

Check Ruby version:

ruby --version

Create a Ruby file:

nano test.rb

Add this code:

puts "Hello Termux!"

Run the file:

ruby test.rb

Basic Commands

Run any Ruby script:

ruby filename.rb

Install gems (Ruby packages):

gem install package-name

List installed gems:

gem list

Show Ruby help:

ruby --help

Check gem help:

gem --help

Uninstall Ruby:

pkg uninstall ruby