当前位置:网站首页>WSL installation, beautification, network agent and remote development
WSL installation, beautification, network agent and remote development
2022-07-02 09:02:00 【Sky_ Tree_ Delivery】
Studying recently CMU15445, Need to use c++ complete project, Official recommendation based on linux Build and compile . Consider efficiency , Do not want to configure on cloud services linux Environmental Science , I heard it just before WSL, So based on WSL+Clion+CMake Build a development environment . stay Clion Write code , And then use it Clion The remote development tools provided are in WSL Build and compile in . This paper records the configuration process of the development environment .
List of articles
NOTE: This article mainly provides the source of the solution , Don't be a porter of official documents and other blogs , Please refer to the link in the article for specific operation steps .
WSL install 、 beautify 、 Network agent and remote development
1. install WSL and Linux Distribution version
WSL It is launched by Microsoft for Windows Specially optimized Linux virtual machine .
If WSL It's not turned on , We first need to open WSL. Then restart the computer .
WSL It can be installed with various Linux System , Can pass Windows Store install , You can also install from the command line .
because Windows Store There may be network problems ( Network problems 0x800704cf Solution : stay Windows Fix error codes on 0x800704cf Methods ), It is recommended to use the command line to install .
See Official documents - Install Linux on Windows with WSL.
2. Terminal beautification
default Windows terminal The terminal is not good-looking , And lack of necessary information . Recommended Oh My Posh beautify PowerShell, Use oh my zsh beautify linux terminal .
Oh My Posh
install
install Oh My Posh, For details, see Official website tutorial - install
To configure profile, stay Powershell The default loading style when opening , For details, see Official website tutorial - prompt
The theme
Configuration style , Configuration method see Official website tutorial - customize.Oh My Posh There are many default styles , Can be in theme Page view .oh my posh By specifying styles json File style , If the method provided on the official website cannot find the file , You can also provide the absolute path of the style directly .
I choose jandedobbeleer The theme ,profile as follows
oh-my-posh init pwsh --config C:\Users\admin\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json | Invoke-Expression
Solve the mess
Oh My Posh Some topics of use special characters , A specific font is required to display correctly .
Generally, two fonts are installed :Powerline fonts & Nerd fonts
Powerline Is a Vim statusline Plug in for , It uses many special icon character .Powerline fonts Is a font set , The essence is to type some existing fonts patch, hold powerline icon Add characters to these existing fonts , At present 30 The programming font is typed patch.
Nerd font Principle and Powerline fonts It's the same , Also for existing fonts patch, Some of the icon Insert characters . however Nerd font It's more powerful , It's a “ A great integrator ”, He almost put the current mainstream icon All the characters are typed in , Including the one just mentioned above powerline icon Characters and Font Awesome Wait for thousands icon character .
After installing fonts , Need to be in windows terminal Of JSON Set the font in the setting file , To take effect .
The final effect is as follows :
oh my zsh
install
See... For the installation process Official documents . First installation zsh, Then install oh my zsh.
The theme
Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.
powerlevel10k It's a zsh A very popular theme . See the official website document for the installation method getting-started. The first installation will provide a setup wizard , Just follow the prompts .
3.WSL go Windows agent
By default ,WSL Not going Windows Agent for , It needs to be set separately .
WSL and Windows Under the same LAN ,WSL It's a virtual host . So you need to open it first Clash Switch that allows LAN access , And set up firewall domain network . Principle that .
Due to the use of other anti-virus software , I choose to turn off the firewall directly .
Tried different schemes , Ultimately based on TAP Agent success . Turn on TAP See Official documents - TAP Pattern . It mainly refers to wsl2 How to set it to go clash Agent for ?37 Building solutions .
Tried TAN Pattern , But it didn't work .
4.JetBrain Remote development
about C++ Development , First, in the Linux Install a make Tools , for example CMake, then Clion Set up WSL As the default development tool chain ,Clion Will automatically identify the build and compile tools . See... For the specific operation process Official documents - WSL.
After setting successfully ,Clion Will use WSL Environment for building and compiling .
If you think this article helps , You can like it before you leave ~
边栏推荐
猜你喜欢
commands out of sync. did you run multiple statements at once
Sqli labs level 8 (Boolean blind note)
整理秒杀系统的面试必备!!!
Service de groupe minecraft
Web security -- Logical ultra vires
C language custom type enumeration, Union (clever use of enumeration, calculation of union size)
Realization of basic function of sequence table
Googlenet network explanation and model building
Kubedm deploys kubernetes v1.23.5 cluster
Minecraft module service opening
随机推荐
PCL calculates the intersection of three mutually nonparallel planes
Sqli labs (post type injection)
Qt的connect函数和disconnect函数
OpenShift构建镜像
Realization of basic function of sequence table
ICMP Protocol
使用递归函数求解字符串的逆置问题
Tensorflow2 keras classification model
Minecraft install resource pack
Minecraft group service opening
C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)
Dip1000 runaway
commands out of sync. did you run multiple statements at once
gocv图片读取并展示
Right click menu of QT
Function ‘ngram‘ is not defined
Select sort and insert sort
Pclpy projection filter -- projection of point cloud to cylinder
History of Web Technology
Programmer training, crazy job hunting, overtime ridiculed by colleagues deserve it