Development environment for using Linux under Windows

Source: Internet
Author: User

It's really inconvenient to do development under windows, like Python or Ruby, but it's a small thing. One time you want to install a node-sass,windows error without msbuild or something, you might need a vs solution, but no one is willing to pack that much, and if you want to install Node-canvas, you might be ready to work more ... But there must be someone like me who can't afford to buy a Mac (cry) and get used to Windows systems, but also want to easily develop in the Linux environment. How to be good ...

Initially just installed on the computer virtual machine Ubuntu, the development of the time to switch to Ubuntu, but still very inefficient, one morning to browse the front-end morning reading class when the article (Front morning reading lesson June very industrious, a good article every day, recommended to focus on the front-end morning reading class public number), the article wrote the following passage:

If you're still using windows like me, you can install an Ubuntu virtual machine, share files via Samba, connect to Windows with SSH, and eventually develop (edit files) in your familiar Windows, while the runtime is Linux.

The article just said a sentence, but did not explain in detail how to do, I am not familiar with Linux, I put this sentence first saved down, today suddenly remembered, with an afternoon when the search everywhere, and finally tinker almost.

Before you begin, make sure that Linux is installed under the virtual machine.

Samba

Samba allows the sharing of resources between Windows and other Unix-like systems, with a more detailed view of its Wikipedia page: Https://zh.wikipedia.org/zh-cn/Samba. installing Samba on Ubuntu is simple, one command:

$ sudo apt-get install Samba

Then, you need to create a folder as a shared directory , such as creating a share directory in the home directory:

$ sudo mkdir-p/home/share

You also need to modify the directory permissions and change it to 777 so that you can read and write to the share folder after sharing to Windows.

$ sudo chmod 777/home/share

However, it is important to note that the above command only tells the share directory that the permissions are set to readable and writable, but its subdirectories or their sub-files still need to be set, you can use wildcards to continue the operation:

$ sudo chmod 777/home/share/*/*

This will not pop up under windows annoying permission enough hints.

Next you need to modify the configuration file :

In general, back up the default configuration before you modify it:

$ sudo cp/etc/samba/smb.conf/etc/samba/smb.default.conf

Add at the end of/etc/samba/smb.conf:

[Share]        Path =/home/share        browseable = yes        writable = yes        comment = Samba share

Path refers to a shared directory, browseable means that the directory is readable, writeable indicates that the directory is writable, and comment is a callout.

The above [share] means you can access it by entering//host/share in the Windows Explorer address bar.

After that, you need to create a shared account, which you need to log in via this account under Windows.

But first you need to create a

$ sudo groupadd username-g 6000$ sudo useradd username-u 6000-g 6000-s/sbin/nologin-d/dev/null

Next, create a samba user with the same username as the account created above:

$ sudo smbpasswd-a smbuser

Will let you enter the password and confirmation.

After completing this series of work, start samba:

$ sudo service smbd restart

Or:

$ Sudo/etc/init.d/samba Restart

After the configuration is complete, you can test it under Ubuntu and need to install the client for Samba:

$ sudo apt-get install smbclient$ smbclient-l//localhost/share

After success, you can see the directory under the Windows Network Neighborhood. You may need to turn on network sharing.

In this way, we can operate this directory from Linux under Windows. The next step is to use the Linux environment.

Ssh

Ubuntu is not installed by default Openssh-server, manually installed:

$ sudo apt-get install Openssh-server

To start the service after installation:

$ sudo/etc/init.d/ssh Start

Or:

$ sudo service ssh start

Default Port 22.

We want to connect to Ubuntu under the Windows via SSH, we recommend WINSCP and Putty, here I just use putty just fine.

Download the installation package, all the way to next:

Start putty, fill in the IP, port, select SSH, click Open:

Pop up the command line, fill in the user and password you want to login, connected, you can enjoy the Linux under the command to play.

Write it in the back.

This completes the work under Windows operating files under Linux development. Because of the unfamiliar with Linux, a full afternoon of time while searching side records.

Tomorrow's work again ~

Development environment for using Linux under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.