I have accidentally closed my machine without clearing a huge Rstudio workspace. Now on starting Rstudio again, it is trying to resume workspace. I have tried killing R session but yet every-time, it starts to load the previous workspace which might take a few days to load. Terminating R will avoid this problem, but only way I know to terminate R is through Rstudio. Is there a way to terminate, not just restart or kill, an R session from terminal. I'm on Ubuntu 18.04. Any help is highly appreciated.
2
- This link might be helpful - How to stop a running R command in linux other than ctrl+c?. All the best!RD_– RD_2020-02-10 06:29:37 +00:00Commented Feb 10, 2020 at 6:29
- Yes, I tried that. Looks like an Rstudio session is different from a R session from terminal. It is still loading the workspace.penguin– penguin2020-02-10 06:30:53 +00:00Commented Feb 10, 2020 at 6:30
Add a comment |
3 Answers
Directly from terminal you do get the ID of the rstudio process using ps aux, and with sudo kill you terminate it:
panther@panther3:~$ ps aux | grep rstudio panther 8500 0.1 0.6 2987220 48436 tty1 Sl+ Okt03 3:37 /usr/lib/rstudio/bin/rstudio panther 8553 0.1 1.1 1197924 93320 tty1 Sl Okt03 3:44 /usr/lib/rstudio/bin/rsession --config-file none --program-mode desktop --www-port 12073 --launcher-token 40641CD7 --show-help-home 1 panther 8559 0.0 0.0 333540 988 tty1 S+ Okt03 0:00 /usr/lib/rstudio/libexec/QtWebEngineProcess --type=zygote --webengine-schemes=qrc:sLV --lang=en-US panther 8561 0.0 0.0 333540 1076 tty1 S+ Okt03 0:00 /usr/lib/rstudio/libexec/QtWebEngineProcess --type=zygote --webengine-schemes=qrc:sLV --lang=en-US panther 18891 0.0 0.0 14752 1000 pts/0 S+ 14:45 0:00 grep --color=auto rstudio panther@panther3:~$ sudo kill -9 8500 Comments
1 Comment
penguin
Any such action from Rstudio won't work while the session is loading.
