How to install RStudio on Ubuntu 20.04 Focal Fossa Linux

RStudio is an integrated development environment for a programming language R for statistical analysis. The objective of this guide is to install RStudio on Ubuntu 20.04 Focal Fossa Linux.

In this tutorial you will learn:

  • How to install RStudio prerequisites
  • How to install RStudio
  • How to start Rstudio application

RStudio on Ubuntu 20.04 Focal Fossa Linux

RStudio on Ubuntu 20.04 Focal Fossa Linux

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
Software RStudio,r-cran
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to install RStudio on Ubuntu 20.04 step by step instructions

  1. First, we need to install all prerequisites. Open up a terminal and enter:
    $ sudo apt update
    $ sudo apt -y install r-base gdebi-core
    


  2. Next, download the Rstudio *.deb package from the official Rstudio website. Head for the most recent Ubuntu release available, meaning if the Ubuntu 20 - focal package is not available, download the Ubuntu 18 - bionic version. Example of downloaded package:
    $ ls
    rstudio-1.2.5019-amd64.deb
    
  3. Use the gdebi command to install the previously downloaded package. The gdebi command will ensure that all additional prerequisites are also downloaded to fulfil the RStudio requirements:
    $ sudo gdebi rstudio-1.2.5019-amd64.deb
    


  4. Use your desktop menu to start the RStudio application.
    Launch RStudio on Ubuntu 20.04 Focal Fossa Linux

    Launch RStudio on Ubuntu 20.04 Focal Fossa Linux

    Alternatively, you can start the application by executing the below command:

    $ rstudio