Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Windows writes code, Linux runs (WSL & VS Code)

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

In the work, often use a Linux server, often a PuTTY or Git Bash connection, to write some Shell, Python,Perl, Groovy and other scripts, usually use vi / vim / emacs / nano and other common editors, these are very easy to use, but also used to. Sometimes, when you want to learn something and want to match a Linux environment, you usually install a virtual machine (such as VirtualBox), and then install a Ubuntu or CentOS.

Now, Windows 10 (windows subsystem for linux) can support Linux.

Type windows subsystem for linux in the search engine to find the official Microsoft installation guide.

Link: https://docs.microsoft.com/en-us/windows/wsl/install-win10

Following the steps in this article, you should be able to install a Linux distribution very quickly. I chose a Ubuntu 18.04LTS, about 200m.

Next, install a VS Code

We want to write code in VS Code and run it on Ubuntu (or the Linux distribution you downloaded). You can refer to An In Depth Tutorial on Linux Development on Windows with WSL and Visual Studio Code

Briefly talk about the content of the article: open the downloaded and installed Linux, set your user name and password to log in, enter code. Linux will install VS Code Server (see the picture in the article) to open your VS Code, install a plug-in Remote-WSL (directly search WSL in Extensions) Click the WSL icon in the lower left corner, select New window (you can connect to Linux) take Python as an example, create a helloworld folder, and then an output of hello.py It is mentioned in the article that you will be prompted to install Pylint when you run Python, which is a tool to check the syntax and format of Python. By the way, the default update source of Ubuntu is the official source, which may be slow in China, so you can change the update source. Here's an example, https://zhuanlan.zhihu.com/p/61228593.

Take your Linux development experience in Windows to the next level with WSL and Visual Studio Code Remote, please refer to

Now can you happily start your Windows to write code and Linux to run?

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report