Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last Updated: Mar 27, 2024
Easy

Installing Ruby on Ubuntu and Debian Linux

Author Sanchit Kumar
0 upvote
gp-icon
Data structures & algorithms (Beginner to Intermediate)
Free guided path
13 chapters
99+ problems
gp-badge
Earn badges and level up

Introduction

Ruby is a high-level interpreted programming language that supports many programming paradigms. It can run efficiently on various operating systems, including WindowsmacOS, and Linux. There are different ways to install Ruby on different operating systems. 

So let us learn the steps in detail for installing Ruby on Ubuntu and Debian Linux. Please go on with the steps and run the commands discussed in this blog with us to learn more thoroughly about installing Ruby on Ubuntu and Debian Linux.

Installing Ruby

You have many options for installing and managing Ruby, whether you use package managers or third-party tools. Using your system's package manager is the simplest method on a UNIX[UNiplexed Information Computing System (UNICS), later known as UNIX]-like an operating system.

Package Management Systems

Ruby can be installed using your system's package manager if you cannot compile it yourself and do not wish to utilize a third-party tool.
Ubuntu and Debian GNU/Linux use the apt package manager.

Installing Ruby on Ubuntu Linux

Ubuntu is a Debian-based Linux distribution mainly made up of free, open-source software.

To install Ruby open the terminal and type the following command:

sudo apt-get install ruby-full 


Then press ‘Enter’ to see ruby getting installed in Ubuntu Linux.

Ruby installation


Type Y and press ‘Enter’, and once completed, it will show the following:

Ruby installation


Verify the installation by typing the below command:

ruby --version 


Then press ‘Enter’ to see the version of Ruby you’ve installed:

Ruby version


Your Ruby version might not be the same as the one displayed above.

All done! Ruby is now available for use on your Ubuntu Linux Computer.

Installing Ruby on Debian Linux

Debian, commonly referred to as Debian GNU (GNU's Not Unix meaning GNU's design is Unix-like, but it differs from Unix in that it is free software and lacks Unix code)/Linux, is a Linux distribution made primarily of free and open-source software. It was created by the Ian Murdock-founded Debian Project, which received support from the community and was first released on August 16, 1993.
 

To install Ruby open the terminal and type the below command:

sudo apt-get install ruby-full 


Then press ‘Enter’ to see Ruby getting installed in Debian Linux.

Ruby installation

Ruby installation


Type Y and press ‘Enter’, and once completed, it will show the following:

Ruby installation


Verify the installation by typing the below command:

ruby --version 


Then press ‘Enter’ to see the version of Ruby you’ve installed:

Ruby version


Your Ruby version might not be the same as the one displayed above.

All done! Ruby is now available for use on your Debian Linux Computer and you’ve now learned the steps for installing Ruby on Ubuntu and Debian Linux respectively.
 

Note: Debian is the source of Ubuntu. It implies that Ubuntu and Debian share numerous packages and libraries from Debian repositories and use the same APT(Advanced Package Tool) mechanism.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Frequently Asked Questions

What is Ruby?

Ruby is a high-level interpreted programming language that supports a wide range of programming paradigms. It was designed with programming productivity and ease of usage in mind.

What is Ubuntu?

Ubuntu is a Debian-based Linux distribution mainly made up of free, open-source software. It is an open-source Linux operating system for the Internet of Things, enterprise servers, the cloud, and the Internet of Things.

What is Debian?

Debian, commonly referred to as Debian GNU/Linux, is a Linux distribution made primarily of free and open-source software. It was created by the Ian Murdock-founded Debian Project, which received support from the community and was first released on August 16, 1993.

What is apt-get?

A command-line tool called apt-get assists Linux users in managing packages. Its primary duty is to retrieve data and packages from trusted sources for use in the installation, upgrade, and removal of packages and the dependencies on which they depend. The Advanced Packaging Tool is abbreviated as APT here.

What is a terminal in Linux?

The Linux command line is a text-based interface called the Linux terminal and is often referred to as the shell, console, or prompt.

Conclusion

This article extensively discussed installing Ruby on Ubuntu and Debian Linux. We learned about what Ruby, Ubuntu and Debian are and the steps in detail for installing Ruby on Ubuntu and Debian Linux.

After reading about installing Ruby on Ubuntu and Debian Linux, are you not feeling excited to read/explore more articles on the topics related to Ruby? Don't worry; Coding Ninjas has you covered. To learn, see History of RubyDocumentation of RubyOfficial Ruby FAQ, and Learn Ruby with the Edgecase Ruby Koans.

Also read, Process Control Block in OS

Refer to our Guided Path on Coding Ninjas Studio to upskill yourself in Data Structures and AlgorithmsCompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your competency in coding, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio! But if you have just started your learning process and are looking for questions asked by tech giants like Amazon, Microsoft, Uber, etc., you must look at the problemsinterview experiences, and interview bundle for placement preparations.

Nevertheless, you may consider our courses to give your career an edge over others!

Thank you

Do upvote our blogs if you find them helpful and engaging!

Happy Learning!

Previous article
Installing Ruby on Red Hat Enterprise and Fedora Linux
Next article
Installing Ruby on Windows
Guided path
Free
gridgp-icon
Data structures & algorithms (Beginner to Intermediate)
13 chapters
109+ Problems
gp-badge
Earn badges and level up
Live masterclass