
Linux-flavored Windows - eamann
http://eamann.com/tech/linux-flavored-windows/
======
drzaiusapelord
This is a weird article. It ignores powershell entirely and I really disagree
about cygwin being this bloaty and difficult thing to install. If you just
want basic unix utilities then cygwin is a breeze to install and use.

On top of it, you can download compilations of standard gnu unix untils at
sourceforge compiled for windows. I have a standard unixutils folder on the c:
root of the drive of all my computers so I can easily access stuff like wget,
netcat, grep, etc. Works well enough.

~~~
eamann
Scripting in Powershell is nothing like scripting in Bash. I like and use
Powershell on a daily basis - but can't re-use my PS scripts on a Mac because
the shells are nothing alike. The point was to achieve OS parity.

For a newcomer, no, Cygwin is not a breeze to install and use. The
documentation is abysmal, the download takes forever (unless you know ahead of
time which tools to install and which to omit), knowing which packages to
install to enable specific features is impossible for someone without
experience, and there is no native uninstaller.

~~~
drzaiusapelord
Why is this person even bothering to use windows instead of running a unixy
desktop plus wine or Windows in a VM? For your requirements, its asinine to
buy a windows box. If you're working in windows, might as well spend 20
minutes learning the basics of powershell. Not sure why this is a
controversial suggestion. Leave windows if its all too bothersome.

~~~
cgh
This is directly addressed in the article. He is a .Net developer.

~~~
csmuk
So am I for pay cheque reasons.

For the sake of sanity though, I use Linux with a windows VM.

------
bliker
<shameless plug> You can get pretty good working enviroment using msysgit +
clink + conemu. It takes a while to set all up.

For the lazy there is
[http://bliker.github.io/cmder](http://bliker.github.io/cmder)

~~~
Touche
That looks amazing.

------
Aldo_MX
I use GnuWin32 and I'm pretty happy with it:

[http://gnuwin32.sourceforge.net/](http://gnuwin32.sourceforge.net/)

DISCLAIMER: I just copy/pasted the steps to install GnuWin32 from a text file
with instructions that _meets my needs_. This means that I deliberately did
things that the documentation doesn't recommend (setx /M PATH...), so I
suggest to read the documentation first.

    
    
      download.bat
      install.bat C:\GnuWin32
      xcopy /i /e /c "C:\GnuWin32\Start Menu" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\GnuWin32"
      setx /M INFOPATH C:\GnuWin32\info
      setx /M WGETRC C:\GnuWin32\etc\wgetrc
      setx /M A2PS_CONFIG C:\GnuWin32\etc\a2ps.cfg
      setx TEMP ^%USERPROFILE^%\AppData\Local\Temp
      setx TMP ^%USERPROFILE^%\AppData\Local\Temp
      setx TMPDIR ^%USERPROFILE^%\AppData\Local\Temp
      setx /M LANG EN
      setx /M LANGUAGE EN
      setx /M PATH "C:\GnuWin32;%PATH%

~~~
angersock
GnuWin32 makes the default command-line shell a bit more bearable...it sadly
is still no replacement for a competent bash. Msys Git does a good job there.

I still would recommend it as a "Good Thing" to have, much like sysinternals (
technet.microsoft.com/en-us/sysinternals/‎ ) if you're on Windows.

------
Leszek
I'm not sure what problems the author had with Cygwin that he didn't with
Git's msys environment. I'm not denying that there were problems, I'm just
curious what they were.

~~~
acqq
I guess the problems come once anybody tries to mix the environments at once:
Git installs msys, the user additionally installs Cygwin and if both are in
the path the confusion is certain.

~~~
Roboprog
Is there a problem simply using the version of git that comes with Cygwin?
Seems to work for me.

------
jackgill
Also worth mentioning is the GnuWin32 project
([http://gnuwin32.sourceforge.net/](http://gnuwin32.sourceforge.net/)). It
provides native Windows builds of many GNU utilities, including a few handy
ones missing from the Git distribution like file and wget.

If you're serious about using Vim on Windows, check out gvim
([http://www.vim.org/download.php#pc](http://www.vim.org/download.php#pc))
which adds some nice Windows integration.

I would also echo the author's point about avoiding Cygwin. It gives you the
worst of both worlds: you can't access Windows facilities, and many Linux
programs don't quite work right. By far a better solution is to use a native
Windows shell (Powershell) together with native Windows builds of various GNU
utilities (from a Git install, GnuWin32, MinGW, etc). Powershell gives you
fluent access to a wide variety of Windows-specific API's, and you don't have
to sacrifice the convenience of a Linux command line environment.

------
vondur
Seems like it would be easier to just install Linux in a VM for your Unix
work, or a Windows VM under a Linux host.

------
zokier
First, you don't need to modify path, you can just open and use the "git bash"
(which is just the bundled bash configured with git in path) for everything.
It even has convenient shell-extension to open it in arbitrary directories.

Secondly, if you like MSYS (which is the environment bundled with git
usually), then you can just download it directly. That way you can choose
which tools you'll want, and stay up-to-date.

edit: interesting how many people seem to be more familiar with gnuwin32 than
msys, considering that gnuwin32 seems pretty dead as a project and never was
as comprehensive as msys.

------
powertower
This is the link to the environment -
[https://github.com/msysgit/msysgit](https://github.com/msysgit/msysgit)

It's kind of like some of this with some other stuff thrown in -

[http://gnuwin32.sourceforge.net/packages.html](http://gnuwin32.sourceforge.net/packages.html)

[http://sourceforge.net/projects/unxutils/](http://sourceforge.net/projects/unxutils/)

------
Cogito
As others have pointed out, the reason why this works is that Git for Windows
is bundled with msys.

You could achieve the same ends by installing msys standalone, but I guess
many already have Git for Windows so this is a simpler path.

The key benefits msys has over cygwin, from my experience, are how lightweight
it is, and how easy and fast it is to set up. I wrangled with cygwin for far
too long (for no good purpose) before switching to msys and then GNU/Linux.

------
cLeEOGPw
What I would like to see is Windows-like or Mac-like Linux environment or
distribution. Not everyone wants and needs to know computer and it's OS inside
out, and those people have no place in Linux world, only Windows and Mac. You
do need to carry knowledge and unnecessary labor that needs to be done and
unwanted information that needs to be absorbed in order to work with Linux is
inadequate and unacceptable.

~~~
davexunit
You clearly have no clue about the state of GNU/Linux. So sick of seeing this
stuff reiterated so many times.

~~~
shadowfox
Perhaps you can explain?

------
techtivist
I would prefer a Windows-flavored Linux tbh ;)

------
thatthatis
I've been fine for years with just adding MSLS when I have to use the widows
command line. [http://utools.com/msls.htm](http://utools.com/msls.htm)

I agree that this is a weird article, but I also like the idea of adding the
git bin to path. I'm going to try that.

------
andyhmltn
I _hate_ developing in windows because of the command line. This actually
improves it quite a bit :)

------
be5invis
The ssh bundled with Git is not a good port. It still uses ANSI version
console API which mess up non-English characters. Note that there ARE APIs
(like WriteConsoleW) supporting Unicode and produces nice multilingual output.

Maybe I have to remake a ssh using Node. Node has a NICE tty port.

------
pistle
Powershell

~~~
eamann
I enjoy Powershell as well, but the Basic-style command structure is a bit
frustrating. Particularly when trying to achieve parity between a Windows
"shell", a Linux shell, and a Mac terminal "shell." Comma-delimited args in
commands don't fit the bill there.

~~~
shadowfox
> Comma-delimited args in commands

Not quite sure what you mean.You don't need to use comma unless you explicitly
want an array of values. So for example a rather simplistic cmdlet/function
like this,

    
    
      Function Foo([string] $text, [int] $count) {
        #Produce repeated text
        $text * $count
      }
    

can be called in any of the following ways:

    
    
      Foo "ab" 3    ---> "ababab"
      Foo -text a -count 3 --> "ababab"
      Foo -t a -c 3   ---> "ababab" [Automatically disambiguated]
    

And we are not even using features of cmdlets like parameter aliasing.

Maybe I understood your concern wrong?

------
davexunit
Just use GNU/Linux!

------
dagurp
So GnuWin32 is included with git then?

