Introduction
Ruby is a high-level interpreted programming language that supports many programming paradigms. It can run efficiently on various operating systems, including Windows, macOS, 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.
Type Y and press ‘Enter’, and once completed, it will show the following:
Verify the installation by typing the below command:
ruby --version
Then press ‘Enter’ to see the version of Ruby you’ve installed:
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.
Type Y and press ‘Enter’, and once completed, it will show the following:
Verify the installation by typing the below command:
ruby --version
Then press ‘Enter’ to see the version of Ruby you’ve installed:
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.