2016-06-09

试了下Win10内嵌的Ubuntu

一直没更新,玩了一年的游戏,大脑非常满足。特别是坎巴拉太空计划,虽然对于宇宙理论知识都有,但玩了后对太空直观的感受依然很颠覆。

最近装了Win10 Insider版,为了WSL(Windows Subsystem for Linux),试了下,非常赞,cygwin可以扔了。

WSL等于在windows中内嵌了一个ubuntu,但不是虚拟机而是本机。本机意味着,你在WSL里开了www服务器,可以直接chrome里用localhost连接上,方便多了。

更吊的是,WSL是直接运行linux的ELF格式的可执行文件,所以apt-get也能正常工作,你linux里编译的二进制也可以直接拿来WSL用。

试了下运行redis:

C:\Users\fac\Desktop>bash -c "redis-server /mnt/c/work/www/conf/redis_dev.conf"
5549:M 07 Jun 21:23:47.420 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
5549:M 07 Jun 21:23:47.420 # Server can't set maximum open files to 10032 because of OS error: Invalid argument.
5549:M 07 Jun 21:23:47.421 # Current maximum open files is 2048. maxclients has been reduced to 2016 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
                _._
        _.-``__ ''-._
    _.-``    `.  `_.  ''-._           Redis 3.2.0 (00000000/0) 64 bit
.-`` .-```.  ```\/    _.,_ ''-._
(    '      ,       .-`  | `,    )     Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
|    `-._   `._    /     _.-'    |     PID: 5549
`-._    `-._  `-./  _.-'    _.-'
|`-._`-._    `-.__.-'    _.-'_.-'|
|    `-._`-._        _.-'_.-'    |           http://redis.io
`-._    `-._`-.__.-'_.-'    _.-'
|`-._`-._    `-.__.-'    _.-'_.-'|
|    `-._`-._        _.-'_.-'    |
`-._    `-._`-.__.-'_.-'    _.-'
    `-._    `-.__.-'    _.-'
        `-._        _.-'
            `-.__.-'

5549:M 07 Jun 21:23:47.423 # Server started, Redis version 3.2.0
5549:M 07 Jun 21:23:47.456 * DB loaded from disk: 0.033 seconds
5549:M 07 Jun 21:23:47.456 * The server is now ready to accept connections on port 6379

redis


回主页