Which will install base R and also the development version of base R (you only need this if you want to compile R packages from source but it doesn’t hurt to have it).
On Ubuntu fire up a shell (Terminal) and use (you will need root permission to do this): sudo apt update In most cases you can just use your OS package manager to install R from the official repository.
There are reasonably comprehensive instruction here for Debian, Redhat, Suse and Ubuntu.