i dont know how the wsl file hierarchy works, but it seems that you need to execute what would normally be /usr/lib64/R/rstudio-server/bin/rserver
there is also an executable /usr/lib64/R/rstudio-server/bin/rstudio-server
If you have no special reason, I recommend Ubuntu on WSL, not CL. And install with apt packages provided by rstudio.org as the official support mentions above. They always provide latest and stable version of RStudio.
Thank you very much to all. You guys are awesome. Let me close this thread by summarizing what I did below for those who do not know nothing about Linux but who want to check out and use Rstudio in CL on wsl2:
There are at least two ways to run Rstudio (wsl2 on Windows 10)
Of course, you can always use Rscript to run your script from the command line.
From my limited experience,
Running R on WSL2-Ubuntu was faster than running R on WSL2-CL. For R on WSL2-Ubuntu, I did something to use openblas in R. For R on WSL2-CL, I just used it out of box as it already offers R with openblas.
This is based on two experiments.
One with the R benchmarking script from (version 2.5): R benchmarks (r-project.org)
Another with my personal Rpackage that heavily relies on Rcpp and Rcpparmadillo.
Tested with Intel i9-10980xe at 3.0ghz with 48Gb memory
To answer your question. There are several reasons:
(1) I am developing several R packages (using machines running on Windows and OSX). I wanted to see how these packages would behave on Linux.
(2) I am trying to learn Linux a little by little by myself. I’d love to move away from Windows at some point in the future (probably, it is not going to happen in the near future, though …). I thought that WSL2 was good for this goal as I can try several distros to get some feeling about them.
I see. I thought that WSL was a contributing factor for this. But, it seems that it may not be just me and my machine. In any case, I am too novice to tell what is going on and how to make it better. In any case, it has been fun experience playing around with multiple Linux distros.
I might be able to compare performance of my Julia code across different platforms in couple of weeks. I will keep you all posted.