How to execute Linux commands on Windows by people who do not know Linux (ubuntu) [Until checking the operation of R and python]

Purpose of this article

--For Windows users (Win10): smile: --You don't have to know Linux (ubuntu): smile: --I'll show you where you can move it for the time being: smile:

Background to writing the article

If you go to github when a new library comes out, go to the tutorial

image.png Image source: StarGAN-Voice-Conversion

sudo,~.sh,wget Until now, linux commands came out ** "Linux environment: innocent: ... VirtualBox is built: innocent: ... but I hate it because it's heavy: innocent: ... Gununu: innocent: ..." ** It was supposed to be If you want to try it easily on windows, It seems that ubuntu can be run on windows, so I will introduce it.

step-1 Enable Windows Subsystem for Linux (WSL)

With win10, you can run Linux environment on windows as a standard function. Feeling of using it It is easier to use than Hyper-V and VirtualBox, so please enjoy the ease of use: relaxed:

01.png

02.PNG

step-2 Download Ubuntu

This time we will use 18.04 LTS, but please choose according to what you want to do. As of June 26, 2020, you can download up to 20.04.

03.png

04.png

Start after installation and set ID and pass By default, pass is not displayed, and even if you type it, the * symbol does not appear, so make sure you type it correctly.

step-3 Type Ubuntu command (update and add R)

Version confirmation

cat /etc/lsb-release

05.PNG

update

sudo apt update

Added download destination for R

echo 'deb https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/' | sudo tee -a /etc/apt/sources.list

Confirm that it has been added in the editor


sudo nano /etc/apt/sources.list

06.PNG

Exit nano with "Ctrl + X"

key added

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

If there is no problem with the command

gpg: Total number processed: 1
gpg:               imported: 1

I think it will come back

Finally

sudo apt install r-base
sudo apt update

step-4 Just check if python and R can be started

Leave python as default and type python3 to open "Ctrl + Z" when both R and python exit

07.PNG

If R or Python says "the package is not included", after starting as above Run install.packages or pip install.

that's all

Now you can try it when you need a Linux environment in the future I did it

Note: When moving folders is troublesome

When moving folders Same as cmd cd ~~~~ You can move it with, but type "bash" into the address of the folder you want to use.

des.gif

Reference article

Let's install Windows Subsystem for Linux (WSL1)! [Introduction to WSL] Part 1 Windows 10 Standard Linux Environment Let's Start WSL Install the latest R on Ubuntu

Recommended Posts

How to execute Linux commands on Windows by people who do not know Linux (ubuntu) [Until checking the operation of R and python]
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
Verification of how to periodically execute a script on a Linux server on Windows
How to execute a schedule by specifying the Python time zone and execution frequency
How much do you know the basics of Python?
How to do "Lending and borrowing JS methods (the one who uses apply)" in Python
How to set up WSL2 on Windows 10 and create a study environment for Linux commands
How to know the number of GPUs from python ~ Notes on using multiprocessing with pytorch ~
The websocket of toio (nodejs) and python / websocket do not connect.
I want to know the features of Python and pip
How to execute external shell scripts and commands in python
Commands and files to check the version of CentOS Linux
How to know the internal structure of an object in Python
[Python] How to get the first and last days of the month
Explaining the mechanism of Linux that you do not know unexpectedly
How to update the python version of Cloud Shell on GCP
A super beginner who does not know the basics of Python tried to graph the realized profit and loss data of Rakuten Securities in Python
[Introduction to Python] How to use the Boolean operator (and ・ or ・ not)
A super beginner who does not know the basics of Python tried to graph the stock price of GAFA
Python 3.6 on Windows ... and to Xamarin.
[Python Kivy] How to get the file path by dragging and dropping
[Python] How to specify the window display position and size of matplotlib
Put Cabocha 0.68 on Windows and try to analyze the dependency with Python
I tried to verify and analyze the acceleration of Python by Cython
I want to analyze the emotions of people who want to meet and tremble
It became possible to take screenshots by starting the smartphone (Android terminal) application with Python using Appium on Windows 10 and automating the screen transition operation.
How to do R chartr () in Python
[Kivy] How to install Kivy on Windows [Python]
How to install php7.4 on Linux (Ubuntu)
How to get started with the 2020 Python project (windows wsl and mac standardization)
I want to use Python in the environment of pyenv + pipenv on Windows 10
How to access the contents of a Linux disk on a Mac (but read-only)
[python] How to sort by the Nth Mth element of a multidimensional array
[Linux] How to read .bashrc of general user as root user on WSL2 Ubuntu20.04
I tried to rescue the data of the laptop by booting it on Ubuntu
On Linux (Ubuntu), tune the Trackpad and set the function to a three-finger swipe