Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Ubuntu on Windows 10 (a.k.a native BASH in Windows)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Ubuntu on Windows 10 (a.k.a native BASH in Windows)

WhizzWrWhizzWr Member
edited August 2016 in General

So anyone tried this yet? https://msdn.microsoft.com/en-us/commandline/wsl/about

I have just updated my W10 install with the so-called Anniversary update.
Enabled the Windows Subsystem for Linux and giggled like stupid when I can apt-get install htop in the CMD prompt.

This is Ubuntu userspace, so most likely simple bash script such as server monitoring script works wonder for Windows user.

Any other use? :P

Comments

  • I tried with the Windows Insider program couple months ago.

    I'd like to use zsh with zpty configured for the PS prompt, and it did not work, found the bug reported in the github. Will try the anniversary update later.

  • NeoonNeoon Community Contributor, Veteran

    The Features are kinda limited, get VirtualBox and mount a Ubuntu ISO?

    Thanked by 2netomx asf
  • Now I can use curl / wget to get the Linux ISO when I get a new computer :)

  • NeoonNeoon Community Contributor, Veteran

    @cassa said:
    Now I can use curl / wget to get the Linux ISO when I get a new computer :)

  • fwiw - bash is not linux -- you couls also use ash, bsh, csh, zsh and so many others, adn the complete set of basic unix tools are not there. Its not the first time M$ has tried to get some posix compliance, and they have never been a success

  • djndjn Member

    Works well with mobaxterm's x11 server

  • personal preference is just use winswitch

  • It works reasonably well to administer remote servers (openssh, rsync...) without the need for Cygwin.

    However it's definitely crippled at the moment, e.g. no support for filesystems beyond NTFS (and every NTFS drive under /mnt lacks proper permissions, everything is root/777...), some visual glitches here and there...

    Thanked by 1MikeA
  • Run a benchmark script.

  • Does this replace cmd or is it an addition? Sounds like cygwin but a little different...

  • It's a full-fledged Ubuntu environment - modulo anything kernel-related - on top of Windows, but does not replace the good old cmd. It may act on top of cmd though, for example by running bash.exe to launch some linux utility.

  • Any idea if it's possible to replace the bash window with something more useful? Particularly, I am missing some mouse clipboard actions and some shortcuts.

  • raindog308raindog308 Administrator, Veteran

    Shot2 said: It's a full-fledged Ubuntu environment - modulo anything kernel-related - on top of Windows, but does not replace the good old cmd. It may act on top of cmd though, for example by running bash.exe to launch some linux utility.

    Full fledged as in sed, awk, cut, grep, tr, etc.?

  • raindog308 said: Full fledged as in sed, awk, cut, grep, tr, etc.?

    Yep, that stuff works.

    I just used it to do some image compression with jpegoptim/optipng and estimate the size before/after with du/awk stuff

    Thanked by 1netomx
  • I find this whole thing a bit odd. Microsoft gains absolutely nothing when it comes to making this move with Cannonical. Those who were using a Linux distribution as their main OS weren't only doing it for the command line and what it gives. I mean sure there were, but those who hated Windows otherwise aren't going to just switch because of it (and even more so those who dislike Cannonical).

    From a server perspective, doesn't this just encourage less usage of Microsoft's own platform? If I can manage my Linux servers or god forbid even learn how to manage one on Windows without even having to install any additional software.. I might not look back.

    I might be playing checkers compared to Microsoft's chess, but I just don't see the strategy on this one.

  • daily said: From a server perspective, doesn't this just encourage less usage of Microsoft's own platform? If I can manage my Linux servers or god forbid even learn how to manage one on Windows without even having to install any additional software.. I might not look back.

    They also are making a SQL Server for Linux. MS's new mind set is instead of everyone being on the MS platform, they want MS to be used on every platform. The command line is generally not for server use, it's for the developers. I know some Linux developers who want to switch to Windows because of the Redstone update.

    Shot2 said: However it's definitely crippled at the moment, e.g. no support for filesystems beyond NTFS (and every NTFS drive under /mnt lacks proper permissions, everything is root/777...), some visual glitches here and there...

    It's on their to-do list. Permissions are handled by Windows, Linux is just not showing them correctly (Windows permissions are vastly more fine grained and are stored differently).

    Thanked by 1yomero
  • @Neoon said:

    @cassa said:
    Now I can use curl / wget to get the Linux ISO when I get a new computer :)

    Where does my G5 running openSuse sit? Cos FU Steve. (great guest machine - near impossible to install anything nasty)

  • NeoonNeoon Community Contributor, Veteran

    @mycosys said:

    @Neoon said:

    @cassa said:
    Now I can use curl / wget to get the Linux ISO when I get a new computer :)

    Where does my G5 running openSuse sit? Cos FU Steve. (great guest machine - near impossible to install anything nasty)

    Thanked by 2cassa yomero
  • @Silvenga said:
    It's on their to-do list. Permissions are handled by Windows, Linux is just not showing them correctly (Windows permissions are vastly more fine grained and are stored differently).

    Any sources to this claim? Last time I asked MS about it on their cvs, I got some DrvFS-related negative answer.

  • Shot2 said: Any sources to this claim?

    Some Github ticket. They also had an article explaining how their translation layer worked.

  • raindog308raindog308 Administrator, Veteran

    @mycosys said:
    Where does my G5 running openSuse sit? Cos FU Steve.

    He's, um, dead ya know. I'm sure as we speak, he's already being F'd hard by the laws of karma.

  • mehargagsmehargags Member
    edited August 2016

    Waiting for this to be available on LTSB...!
    Watch this... https://msdn.microsoft.com/en-us/commandline/wsl/about

  • raindog308raindog308 Administrator, Veteran

    So Windows is now a GRUB alternative...interesting.

    Thanked by 1msg7086
  • WhizzWrWhizzWr Member
    edited August 2016

    cassa said: Now I can use curl / wget to get the Linux ISO when I get a new computer

    Prof. pic checks out. I read this in Stewie Griffin's voice

    I've found executing ruby/perl/python scripts feels a lot cleaner in this bash compatibility layer. GCC works well too.

    Anyway, I just found out even X Server GUI works. Pretty neat IMO.

  • Great Post OP! I have done the same on my laptop with Windows 10 Home edition and it is working fine. Though I am having issue with GUI. I was not able to run unity - Ubuntu Desktop. Facing some errors. Also, export DISPLAY=localhost:0 works only when I have Xserver running (I am using MobaXterm). ccsm was running but compiz failed. xterm also ran successfully. Now I am testing kvm , qemu, virt-inst, etc.

  • It's a very smart move my MS. Just installing Windows again on my laptop after 5 years, because of this feature. Windows was practically unusable for dev work until now, but I tried it at work and I am ready to give it a chance.
    I noticed some networking features are not working (for example traceroute was not working, ping only if you start Bash as Windows Admin) and as expected virtualization (Docker) is not working, but all dev tools I tried worked fine. It feels like OpenVZ in Windows, it's not full blown virtualization, but it may just be good enough.

    I am curious what will happen with file endings when the same file is used by Linux and Windows tools?

  • @Silvenga said:
    They also are making a SIt is more that QL Server for Linux. MS's new mind set is instead of everyone being on the MS platform, they want MS to be used on every platform.

    It is more that the OS is no longer the platform and other changes that their business models are changing to survive with. Outside Apple users the "pay for chunks of OS improvement" market is falling off rapidly and the subscription model doesn't seem to work in that space either so Windows is getting to be a harder sell (at least to the end user). Where they are going to continue to make their money in future is SQL Server in business markets, Office in both business and home markets (in the latter the subscription model they've been nudging towards for many years is really starting to be successful), and the "new" platform: selling infrastructure as a service via Azure. They don't care if you use Windows or not, but whatever OS you use they'd like you to pay for bits of the Azure platform for your infrastructure, SQL Server for your databases, and office. Whether that means we'll see an Office port for Linux like the SQL Server one I'm not sure, they might just continue to improve Office Online and expect you to use that, though it isn't much of a stretch to think they may extend the cut-down Office Mobile (as seen on Android) to a Linux desktop port even if they don't make a fuller edition for that OS.

    It's on their to-do list. Permissions are handled by Windows, Linux is just not showing them correctly

    Aye. Permissions between Windows and Unix-a-like worlds can be a pain. Cygwin doesn't always "get it right" in terms of seemlessly doing what I expect/want.

    (Windows permissions are vastly more fine grained and are stored differently).

    There are ways to get far more fine-grained control than the traditional ugo/rwx model under Linux, but you don't see them used often in my experience and they aren't as well supported in the GUI file management tools (or weren't last time I looked, I only tend to use unix-a-likes mostly from the command line). ext2+ filesystems support PISOX ACLs for instance (https://help.ubuntu.com/community/FilePermissionsACLs), ZFS has a more detailed (but also POSIX compliant) model as a core feature (https://blogs.oracle.com/marks/entry/zfs_acls), and so on.

  • miaumiau Member

    Is there any way to make it retain the session inside tmux?

Sign In or Register to comment.