一、在Windows中配置Ubuntu
1、打开控制面板,点击“程序”

2、点击“启动或关闭Windows功能 ”

3、勾选“适用于Linux的Windows子系统”,确定并重启电脑

4、打开Windows10的App Store, 在搜索框输入“wsl”,在搜索结果选择“Ubuntu“或者“Ubuntu 18.04 LTS”,下载安装。


5、安装成功之后启动, 会显示在安装,等待安装成功。安装时间比较久,不要关闭窗口。安装完成后会要求输入用户名,按照自己想输入的名字输入即可,然后是密码,密码输入后不会显示出来,重复输入确认就OK了(用户名和密码最好是一样的,这样随便怎么输入都对)。牢记自己的用户名和密码,后面登录rstudio–server需要。



二、 安装R
sudo apt-get update #第一步

sudo apt-get install r-base #第二步


sudo apt-get install r-base-dev #第三步


三、启动R
在Ubuntu里面输入“R"即可启动, R语言安装完成。

四、安装rstudio-server
sudo apt-get install gdebi-core #第一步

wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-1.2.1335-amd64.deb #第二步

sudo gdebi rstudio-server-1.2.1335-amd64.deb #第三步

启动server
打开Ubuntu,输入“ rstudio-server start”,然后回车,不要关闭窗口。
rstudio-server start

打开浏览器,在地址栏输入“localhost:8787"
localhost:8787

登录
用户名和密码即为Ubuntu的用户名和密码


网友评论