在Windows下最佳的Linux开发环境 - The Ubuntu Sub System (New Bash Shell) in Windows 10

The Ubuntu Sub System (New Bash Shell) in Windows 10 is a truly Linux kernel (unlike cygwin, which is just a shell). It means that you can compile on Windows in the Sub System to Linux COFF binary file which also works if you copy that to the Linux system. It works vice versa.

I am developing some scripts and bots using Python3, and I found it simpler and convenient to use this Ubuntu Sub System on Windows 10. I am a Windows OS user and a casual Linux fan, and this works best for me.

It is more than enough if you want to develop some scripts (Python, BASH etc) for Linux. So you have the best of both worlds, while you still can enjoy Windows for the Gaming, legacy software, Windows Batch CMD and if you are a geek, you still can write and run your scripts quickly e.g. awk, sed ...

On the New Bash Shell, your windows Disk structure is mounted at /mnt/c, /mnt/d ... so yes, it is a real sub-system instead of a emulator.

很多人都是习惯于用WINDOWS,或者说离不开WINDOWS 操作系统。有时候程序员又想同时开发LINUX相关的软件,这就比较麻烦:有时候需要把本地的数据传到远程或者从远程下载数据。

之前有过 cygwin, 但是这个是相对不成熟的环境,在这个环境里用 gcc 编译出来的二进制代码执行效率要低的多,而且生成的也是 WIN32 PE可执行格式。

现在好了,WINDOWS 10 和 UBUNTU 合作,提供了一个 The Ubuntu Sub System,这个可不是简单的环境模拟,这个是真正的UBUNTU 内核内嵌。举个例子来说,你可以从真正UBUNTU操作系统拷贝一个COFF二进制文件到WINDOWS 10的这个内核中可以完全一样的执行,相反也一样。

您可以在控制面版里添加:

比如安装GCC编译器:

这些命令都完全一样,完全一样指的是获取镜像软件更新的地址都是一样的。

apt-get update
apt-get autoremove
apt-get upgrade
apt-get dist-upgrade

和CYGWIN不一样,WINDOWS系统文件是在被 mount 到 /mnt/c, /mnt/d 这个是比较符合逻辑的。

VI编辑器:

htop:

通过命令 lsb_release -a 来查看版本信息:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

你可以把这些开发工具都装上:Python3, Python2, lua, gcc, java。

这样来开发steem相关的程序要方便得多,因为,你并不需要专门去找一台LINUX的服务器(如VPS)。

Originally published at https://steemit.com Thank you for reading my post, feel free to Follow, Upvote, Reply, ReSteem (repost) @justyy which motivates me to create more quality posts.

原创 https://Steemit.com 首发。感谢阅读,如有可能,欢迎Follow, Upvote, Reply, ReSteem (repost) @justyy 激励我创作更多更好的内容。

// 稍后同步到我的中文博客和英文计算机博客

近期热贴

Recent Popular Posts


Tags: #cn #cn-programming #ubuntu #subsystem #linux

H2
H3
H4
3 columns
2 columns
1 column
13 Comments