»
首页
|
手机数码
|
汽车资讯
|
游戏硬件
|
评测专题
|
手机壁纸
|
海淘值得买
|
度假
|
求职招聘
|
广告联系
» 您尚未登录:请
登录
|
注册
|
标签
|
帮助
|
小黑屋
|
TGFC Lifestyle
»
完全数码讨论区
» 今晚Windows10要一统天下!
发新话题
发布投票
发布商品
发布悬赏
发布活动
发布辩论
发布视频
打印
今晚Windows10要一统天下!
xphi
小黑屋
帖子
1287
精华
0
积分
16133
激骚
94 度
爱车
主机
相机
手机
注册时间
2005-7-24
发短消息
加为好友
当前离线
1
#
大
中
小
发表于 2016-3-31 04:44
显示全部帖子
posted by wap, platform: iPhone
http://blog.dustinkirkland.com/2016/03/ubuntu-on-windows.html?m=1
引用一段话
Here's let's break it down slowly...
Windows 10 users
Can open the Windows Start menu
And type "bash" [enter]
Which opens a cmd.exe console
Running Ubuntu's /bin/bash
With full access to all of Ubuntu user space
Yes, that means apt, ssh, rsync, find, grep, awk, sed, sort, xargs, md5sum, gpg, curl, wget, apache, mysql, python, perl, ruby, php, gcc, tar, vim, emacs, diff, patch...
And most of the tens of thousands binary packages available in the Ubuntu archives!
"Right, so just Ubuntu running in a virtual machine?" Nope! This isn't a virtual machine at all. There's no Linux kernel booting in a VM under a hypervisor. It's just the Ubuntu user space.
"Ah, okay, so this is Ubuntu in a container then?" Nope! This isn't a container either. It's native Ubuntu binaries running directly in Windows.
"Hum, well it's like cygwin perhaps?" Nope! Cygwin includes open source utilities are recompiled from source to run natively in Windows. Here, we're talking about bit-for-bit, checksum-for-checksum Ubuntu ELF binaries running directly in Windows.
[long pause]
"So maybe something like a Linux emulator?" Now you're getting warmer! A team of sharp developers at Microsoft has been hard at work adapting some Microsoft research technology to basically perform real time translation of Linux syscalls into Windows OS syscalls. Linux geeks can think of it sort of the inverse of "wine" -- Ubuntu binaries running natively in Windows. Microsoft calls it their "Windows Subsystem for Linux". (No, it's not open source at this time.)
Oh, and it's totally shit hot! The sysbench utility is showing nearly equivalent cpu, memory, and io performance.
UID
45266
帖子
1287
精华
0
积分
16133
交易积分
0
阅读权限
1
在线时间
4252 小时
注册时间
2005-7-24
最后登录
2019-11-19
查看详细资料
TOP
xphi
小黑屋
帖子
1287
精华
0
积分
16133
激骚
94 度
爱车
主机
相机
手机
注册时间
2005-7-24
发短消息
加为好友
当前离线
2
#
大
中
小
发表于 2016-3-31 08:08
显示全部帖子
posted by wap, platform: iPhone
这个对很多用Linux和OSX的开发人员来说是多了一个选择,大量的GNU工具集和软件生态在Windows下可以直接重建起来,所以意义应该很重大。
UID
45266
帖子
1287
精华
0
积分
16133
交易积分
0
阅读权限
1
在线时间
4252 小时
注册时间
2005-7-24
最后登录
2019-11-19
查看详细资料
TOP
xphi
小黑屋
帖子
1287
精华
0
积分
16133
激骚
94 度
爱车
主机
相机
手机
注册时间
2005-7-24
发短消息
加为好友
当前离线
3
#
大
中
小
发表于 2016-3-31 09:22
显示全部帖子
我引用的那个帖子似乎不搭梯子看不了,我把后面的贴完吧:
……
So as part of the engineering work, I needed to wrap the stock Ubuntu root filesystem into a Windows application package (.appx) file for suitable upload to the Windows Store. That required me to use Microsoft Visual Studio to clone a sample application, edit a few dozen XML files, create a bunch of icon .png's of various sizes, and so on.
Not being Windows developer, I struggled and fought with Visual Studio on this Windows desktop for a few hours, until I was about ready to smash my coffee mug through the damn screen!
Instead, I pressed the Windows key, typed "bash", hit enter. Then I found the sample application directory in /mnt/c/Users/Kirkland/Downloads, and copied it using "cp -a". I used find | xargs | rename to update a bunch of filenames. And a quick grep | xargs | sed to comprehensively search and replace s/SampleApp/UbuntuOnWindows/. And Ubuntu's convert utility quickly resized a bunch of icons. Then I let Visual Studio do its thing, compiling the package and uploading to the Windows Store. Voila!
Did you catch that bit about /mnt/c... That's pretty cool... All of your Windows drives, like C: are mounted read/write directly under /mnt. And, vice versa, you can see all of your Ubuntu filesystem from Windows Explorer in C:\Users\Kirkland\AppData\Local\Lxss\rootfs\
Meanwhile, I also needed to ssh over to some of my other Ubuntu systems to get some work done. No need for Putty! Just ssh directly from within the Ubuntu shell.
Of course apt install and upgrade as expected.
Is everything working exactly as expected? No, not quite. Not yet, at least. The vast majority of the LTP passes and works well. But there are some imperfections still, especially around tty's an the vt100. My beloved byobu, screen, and tmux don't quite work yet, but they're getting close!
And while the current image is Ubuntu 14.04 LTS, we're expecting to see Ubuntu 16.04 LTS replacing Ubuntu 14.04 in the Windows Store very, very soon.
Finally, I imagine some of you -- long time Windows and Ubuntu users alike -- are still wondering, perhaps, "Why?!?" Having dedicated most of the past two decades of my career to free and open source software, this is an almost surreal endorsement by Microsoft on the importance of open source to developers. Indeed, what a fantastic opportunity to bridge the world of free and open source technology directly into any Windows 10 desktop on the planet. And what a wonderful vector into learning and using more Ubuntu and Linux in public clouds like Azure. From Microsoft's perspective, a variety of surveys and user studies have pointed to bash and Linux tools -- very specifically, Ubuntu -- be available in Windows, and without resource-heavy full virtualization.
So if you're a Windows Insider and have access to the early beta of this technology, we certainly hope you'll try it out! Let us know what you think!
附件:
您所在的用户组无法下载或查看附件
UID
45266
帖子
1287
精华
0
积分
16133
交易积分
0
阅读权限
1
在线时间
4252 小时
注册时间
2005-7-24
最后登录
2019-11-19
查看详细资料
TOP
xphi
小黑屋
帖子
1287
精华
0
积分
16133
激骚
94 度
爱车
主机
相机
手机
注册时间
2005-7-24
发短消息
加为好友
当前离线
4
#
大
中
小
发表于 2016-3-31 09:30
显示全部帖子
其实那个帖子的作者给出了这个东西一个最大的应用,就是针对习惯使用大堆GNU工具的工程师,现在可以吧工作完全移到Windows下面来做。而且我个人人为,Windows的GUI本身在应用丰富程度,生态环境方面都比Linux强大,比OSX基本也占优势,所不足的就是在终端应用方面,现在把整个GNU生态环境全部搬过来实在是非常好的补充。
从文中来看,是实现了整个Ubuntu的用户态空间,所以理论上只要程序不陷入到核态就应该可以跑,这样像GCC之类的纯用户态程序跑起来应该毫无压力。此外这次应该没有GUI什么事,不过就像我前面说的,本身Windows的GUI就有巨大优势,要补足的只是终端字符界面,所以这个也无所谓了。
UID
45266
帖子
1287
精华
0
积分
16133
交易积分
0
阅读权限
1
在线时间
4252 小时
注册时间
2005-7-24
最后登录
2019-11-19
查看详细资料
TOP
控制面板首页
密码修改
积分交易
积分记录
公众用户组
基本概况
版块排行
主题排行
发帖排行
积分排行
交易排行
在线时间
管理团队
管理统计