How To Install R and RStudio Desktop in Ubuntu Linux 20.04

We ever discussed How To Install R and RStudio Server in Ubuntu Linux 20.04. If the purpose is to install a local RStudio IDE instead of a remote RStudio Server, we can install RStudio Desktop.

In this post, we introduce how to install R and RStudio Desktop on Ubuntu Linux 20.04. For other Ubuntu version, the steps are similar. But make sure to download the RStudio Desktop package for that version of Ubuntu Linux.

Install R environment

Install R environment as follows (for more details, please check Install R environment in Ubuntu Linux) as follows.

$ sudo apt update
$ sudo apt install r-base

Install RStudio Desktop on Ubuntu

After the R environment is ready, we can move to to install the RStudio Desktop.

First, download the RStudio Desktop software package by

$ wget

Then, install the deb package as follows.

$ sudo apt install ./rstudio-1.3.1093-amd64.deb 

It should print output as follows.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'rstudio' instead of './rstudio-1.3.1093-amd64.deb'
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/127 MB of archives.
After this operation, 844 MB of additional disk space will be used.
Get:1 /home/davidyang/Downloads/rstudio-1.3.1093-amd64.deb rstudio amd64 1.3.1093 [127 MB]
Selecting previously unselected package rstudio.
(Reading database ... 267829 files and directories currently installed.)
Preparing to unpack .../rstudio-1.3.1093-amd64.deb ...
Unpacking rstudio (1.3.1093) ...
Setting up rstudio (1.3.1093) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for shared-mime-info (1.15-1) ...

Verify the R and RStudio Desktop installation

Start RStudio Desktop by opening the RStudio program from the application launcher or application menu, or by running the command

$ rstudio

Then the RStudio Desktop window will show. In the Console panel, let’s run some demos and verify the environment:

> demo(nlm)

Hit Enter to start the demos. The results and plot will shows as follows.

Leave a Reply

Your email address will not be published. Required fields are marked *