How to install RStudio on Ubuntu

What is RStudio?

RStudio is an IDE (integrated development environment) specifically for R and Python. It incorporated advanced modern features to R, such as console, syntax-highlighting editor that supports direct code execution, and tools for plotting, history, debugging and workspace management.

RStudio is distributed in two different edition: Rstudio Desktop is an application built specifically to run locally and RStudio Server is a centralized solution, allows for accessing RStudio through a web browser.

Both RStudio Desktop and RStudio Server/Server Pro runs natively on Ubuntu, along with a host of other Linux distro like CentOS, OpenSUSE, etc. Only RStudio Desktop has the ability to run on Windows and macOS. In this article, we are using RStudio term for RStudio Desktop version.

Before installing RStudio, you need to have R and git fully set up on your system.

RStudio on Ubuntu Prerequisites : Installing R

R is a free, open source programming language that was built specifically for statistical programming and graphics.

To install R on Ubuntu, you need to open up your Terminal app of choice and run these commands:

sudo apt-get update
sudo apt-get install r-base r-base-dev

image-20201002152334599

For installation on other Linux distros, please consult CRAN documentation at https://cran.r-project.org/ for more information.

RStudio on Ubuntu Prerequisites : Installing Git

Git is a popular version control system designed for tracking changes in source code during software development. RStudio can integrate git into your workflow and help you visualize your work.

On Ubuntu, you can use your package manager to install git from the command line:\

sudo apt install git-all

image-20201002153002220

Install RStudio on Ubuntu

Now that you have git and R installed, you're all set to install RStudio itself.

First you need to go to RStudio download page to grab the .deb installation file for Ubuntu. Please do note that RStudio phased out support for 32-bit systems. If you are running on Ubuntu 32-bit, consider reinstalling Ubuntu 64-bit.

image-20201002153615409

In the list, please select Download in RStudio Desktop section.

You will be taken to All Installers section, select a deb package suitable to your Ubuntu version to begin download it.

image-20201002153713285

Official RStudio build for Linux-based operating systems is signed with a GnuPG key to ensure that the binary are genuine and it has not been tampered with by a third party. Before begin installation, you need to run the following command to import RStudio key into Ubuntu.

gpg --keyserver keys.gnupg.net --recv-keys 3F32EE77E331692F

The response should look like this:

image-20201002154224610

After that, you need to open the .deb file you've just downloaded in Software Manager, then click Install. You may also need to supply your password upon installation.

Verify that RStudio is installed

Search for the RStudio app icon on your system and double click to open up the app.

Just open Activities menu and type in “RStudio” and you should see a shortcut to
the RStudio app appear. Double click this icon.

image-20201002154812256

You should now see the RStudio interface. It should look something like this.

image-20201002154935498

Congratulations, you now have RStudio installed and ready to go!

FAQ

Which operating system does RStudio support?

RStudio officially supports Windows, MacOS and Linux at the moment.

What do I need to install before installing RStudio?

You need to have R and git on your system before installing RStudio

Does RStudio runs on 32-bit OS?

No, RStudio phased out support for 32-bit OS. You may need to upgrade to 64-bit operating system or run RStudio inside a virtual machine.

Click to rate this post!
[Total: 1 Average: 5]

2 thoughts on “How to install RStudio on Ubuntu”

Leave a Comment