Installation of R and RStudio in Ubuntu

In this blog I am giving steps to install R and RStudio in your Ubuntu Machine. Installation of R/RStudio in Ubuntu is just a few steps procedure. First of all open the terminal and give the following commands

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

These commands will install available version of R in your machine. You can check the version of R by type the command R on your terminal. To come out of terminal just type


It will ask to save or not to save your workspace as per your choice just come out of the terminal.

To install the Rstudio now download the latest debian file ( Download latest rstudio deb/exe/rpm from ( ). We used rstudio-1.0.143-amd64.deb at the time of writing this blog.

After downloading the .deb file in your system, just give the command sudo gdebi rstudio-1.0.143-amd64.deb . Ensure that you are in the same directory in which debian file is downloaded or you have given the right path to that file.
Note: if gdebi is not installed in you system just install it first by simple command:
sudo apt-get install gdebi and then install RStudio using sudo gdebi rstudio-1.0.143-amd64.deb command.

Once you have executed the above given commands, just type rstudio in your terminal as shown:

you will have the rstudio GUI interface in your system as shown below.

Now you can play with features of R on this RStudio interface. RStudio is a package based programming framework. You just install the packages form right side window packages and install option. just type the package you need to install and it will be installed with no efforts.

Most of the packages will be installed simply. But a few new packages may throw error. It is due to version of R. If you have some older version of R installed on your machine there is no escape plan to install new packages in Rstudio other than upgrading your R version.

Close Menu