Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

linux
ruby

How to install Ruby on Linux

Umme Ammara

Before installing, you can check if Ruby is already installed in the system by running the following command in the terminal:

which ruby

Ruby is already installed if the output shows a path as usr/bin/ruby/. If an error message is displayed instead, Ruby is not installed.

Installing Ruby

The easiest way to install Ruby on Linux-based systems is through the apt package manager, by running commands in the terminal. The steps involved are as follows:

Step 1

Update the packages index by running the following command in the terminal:

sudo apt update

Step 2

Install Ruby by typing the following command in the terminal:

sudo apt install ruby-full

Step 3

To verify that Ruby has been installed successfully, run the following command:

ruby --version

RELATED TAGS

linux
ruby

CONTRIBUTOR

Umme Ammara
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring