The most recent project was developed using Vue+Nodejs+Mysql’s main stack technology. I need to run on Linux, but the main development machine is Windows, to do both I used Windows Subsystem of Linux. You know, the weirdo that people don’t think much of. In fact, it is good to use, you can use Linux features, but it is relatively quick to install and run, and you do not need to start a VIRTUAL machine. I compiled the background services and Vue, used the common commands in WSL, and a terminal handled the main automation and non-automatic commands.
Every day I need to enter the command into my project directory, whether it can be automated. What I want is to automatically enter my D :/ Github/MyProject every time I start WSL. The bash shell for Linux allows you to add startup commands by editing the.bashrc file, adding the commands you need to the end of the file.
echo "cd /mnt/d/Github/myproject" >> ~/.bashrc
Copy the code
WSL can access the Windows file system, which is all bound to/MNT. Drive D is in/MNT /d, and drive C is in/MNT /c. Copy the other directories, but change the path separator from “”” to “” /””.
Windows developers are often mocked by open technology developers, for example, I saw that the sqlserver driver for Sequelize was called tedious and the other drivers were all normal names. But Windows technology isn’t really that bad. Of course I prefer open technology.
However, if I want the WSL to be able to access two directories, one server directory and one client directory, this will not work.
What I’m doing now is using a terminal tool called Mobaxterm to create two sessions and add my own startup script to each session.
This is very convenient. Start into WSL and the service is ready.
In my case, I created and started three sessions, one client, one server, and one mysql.