You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Question: How can I easily install R & RStudio on Ubuntu 20.04/19.04/18.04/16.04 / Debian / Linux Mint distribution?. R is a programming language commonly used for statistical computing and graphical representation of data. RStudio is a set of integrated tools designed to help R developers be more productive.

rstudio ui

Rstudio is the chief integrated development environment for R with a variety of robust tools for plotting, viewing history, debugging and managing your workspace. You can choose the edition to run – open source or commercial.

Key Features of RStudio

  • Runs on Windows, Linux, and macOS
  • Syntax highlighting, code completion, and smart indentation
  • Integrated support for Git and Subversion
  • Execute R code directly from the source editor
  • Quickly jump to function definitions
  • Easily manage multiple working directories using projects
  • Integrated R help and documentation
  • Interactive debugger to diagnose and fix errors quickly
  • Extensive package development tools
  • Support for interactive graphics with Shiny and ggvis
  • Supports authoring HTML, PDF, Word Documents, and slide shows

By choosing the commercial edition, you get additional features such as Access to priority email support and 8 hour response during business hours (ET). Learn more about RStudio editions and features.

Here in this article, we’ll dive to the installation of Open source edition of RStudio released under AGPL License.

Step 1: Update system

Like always, update system package index, and optionally upgrade all installed packages to latest.

sudo apt update
sudo apt -y upgrade

Step 2: Install R on Ubuntu / Debian

We need to install r-base package which contains the basic R functions that let you perform arithmetic operations and basic programming in R. Use the command below to install.

sudo apt -y install r-base

Step 3: Download and Install RStudio

Now visit the  RStudio downloads page to grab the latest release of RStudio for Debian based Linux distributions.

As of this article update, the latest version is 1.2.1335.

--- Ubuntu 18.04 / Linux Mint 19 / Debian 10 ---
sudo apt -y install wget
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5042-amd64.deb
sudo apt install ./rstudio-1.2.5042-amd64.deb

--- Ubuntu 16.04 / Linux Mint 18 ---
sudo apt -y install wget
wget https://download1.rstudio.org/desktop/xenial/amd64/rstudio-1.2.5042-amd64.deb
sudo apt install ./rstudio-1.2.5042-amd64.deb

--- Debian 9+ ---
wget https://download1.rstudio.org/desktop/debian9/x86_64/rstudio-1.2.5042-amd64.deb
sudo apt install ./rstudio-1.2.5042-amd64.deb

If you encounter any dependency problems, run:

sudo apt -f install

Expected installation output.

Install RStudio Ubuntu Debian Linux Mint

Step 4: Launch RStudio

Launch RStudio from Applications search section of your Desktop Environment or from the terminal.

Launch RStudio Ubuntu Debian Linux Mint

For terminal, run:

$ rstudio

Its UI looks like this.

rstudio ui

Nice!. Your installation of R and RStudio on Ubuntu / Debian and Linux Mint has been successful. Our next guide will cover the same setup on CentOS and Fedora. Stay tuned by subscribing to our weekly newsletter and following us on social media pages.

Similar articles:

How to Install NetBeans IDE on Ubuntu, Debian, Linux Mint

Install Eclipse IDE on Ubuntu

Install Android Studio on Ubuntu / Linux Mint / Debian

As an appreciation for the content we put out,
we would be thrilled if you support us!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here