Boost Your R Programming Environment

RStudio server on Windows WSL2 which now supports GPU compute.


Using the enhanced WSL (version 2) for setting up RStudio Server is recommended, which requires Windows 10 (Version 2004; Build 19041 or higher).

  1. In case your system is lower than the suggested version, please update to the latest Windows version.
  2. Lucky for you’ll I have a video linked below which explains installation of WSL2 in 5 minutes.

Installing Your Favourite Linux Distribution

How to install Ubuntu on windows (wsl2)

RStudio Server Setup

Now that you have successfully installed a Linux distribution on your system via WSL, you can setup and run RStudio Server by following the procedures below:

  • Make sure your Linux packages are up-to-date using the following command (we will assume that you have installed a Ubuntu distribution): sudo apt-get update sudo apt-get upgrade -y Note: Provide the password of your user account that you created for the Linux system, not the Windows password to log in for your PC.
  • Add the following apt credential to your repository list for Getting the Latest R (v4.0.1 as of this writing):sudo apt-key adv --keyserver --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo add-apt-repository 'deb https://cloud.r focal-cran40/'
  • Install R with some essential dependencies for the RStudio Server and devtools: sudo apt install -y r-base r-base-core r-recommended r-base-dev gdebi-core build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
  • Install latest stable release of RStudio Server for Ubuntu 18 or newer:wget sudo gdebi rstudio-server-latest-amd64.deb

Launching Rstudio Server in Browser

  1. Launch RStudio Server: sudo rstudio-server start
  2. Access your server at http://localhost:8787

Removing RStudio Server

The following steps explain how to uninstall RStudio Server from WSL:

  • Remove your Server:sudo apt-get remove rstudio-server -y

Written by

Pursuing Masters in Bioinformatics, Digital artist and content creator. Contact:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store