Can you even install tools like grep on windows? I installed a windows 7 vm so i could learn a little more about the windows cmd interpreter.
Yup. You can install Cygwin on any windows machine and can add pretty much all of the familiar unix/linux tools, including grep, sed, awk, cut, top etc. etc..
I've even managed to install X11 and dwm on windows and can also build, install and run graphical Linux applications in Cygwin/X on Windows too.
Back when KDE4 was still around, you could even install and run ALL of KDE on windows. Gnome, XFCE etc. will also run on Windows.
Sadly it can't replace the Windows desktop. But you can run X with a desktop in Windows via cygwin as if it was a separate application.
Here's a quick screenshot from the monitors on my work PC:
The left half of the shot is monitor 1, the right is monitor 2.
On the left of monitor 1 is my cygwin window.
On the right of monitor 1 is Chrome with this thread open.
On the right is monitor 2 running dwm via Cygwin/X.
In my cygwin window, you can see I've used cat to display the content of a script in my personal bin directory, called
. Which I use to start dwm.
I've also ran
, so you can see I'm running cygwin.
Then I ran the
script to actually start the instance of dwm that is running in the 2nd monitor.
And at the bottom of monitor 2, you can see the Windows menu-bar.
And here's a screenshot of some applications running in dwm, on Cygwin/X on Windows:
In the above screenshot, taken from monitor 2:
In dwm, the left side of the screen is the master area.
And the right hand side of the screen is known as the stack.
So the application running in the master area is
, a graphical application showing the git commit history of the st repository.
In the stack area, we have a terminal window at the top, which has been attached to the same tmux session that is running in the cygwin window in monitor 1 in my previous screenshot.
In it, you can see we're on the Music tab of my tmux session, which currently has
(terminal based music player) running, playing a song by Band Maid.
Underneath that is a window with GVim running, which I launched via
- dwm's text based menu/launcher.
And at the bottom is another terminal window, which is in the source directory for suckless.org's st terminal. This is the terminal I launched
Unfortunately, I don't have anything too fancy installed ATM.
I removed all of the things I didn't need because they were taking up too much space on my work PC's HD.
But you can clearly see dwm running in Cygwin/X on Windows. It is possible to run other Linux desktops in a similar way.
In the past, I've managed to get the XFCE, KDE4, Cinnamon, Gnome, Openbox, Enlightenment, wmii, XMonad DE's / WM's running on Windows in this way.
Again, it's not like you can replace the Windows desktop with another desktop, but it is possible to run them as if they were just another application in Windows.
The reasons I installed
on Windows are:
1. I really like dwm.
2. dwm has 'tags' and tags are awesome.
Basically, if I ever need to run, or connect to multiple tmux sessions at once - rather than opening several cygwin/mintty terminals and managing them from the Windows desktop, I can run dwm, open all of the terminals in different tags in dwm, starting/connecting to any tmux sessions. And then I have ALL of my terminal windows contained inside the main dwm window on the Windows desktop.
So I can more quickly and elegantly navigate between the terminal windows open in any of the tmux sessions. I can also quickly switch between the main terminals in dwm. And I can easily switch between dwm and the other applications running on the Windows desktop. It just makes things a little more fluid for me.
Whereas I don't see any practical point in running Gnome, or KDE on Windows, other than as a "Look what I can do!" type of thing. Ha ha!
But I'd be lost at work if I didn't have all of my favourite command line tools from unix/linux available to me on Windows. So Cygwin/mintty is an absolute necessity!
I can't stand cmd and powershell on windows. They just don't have enough useful tools/commands available in them. They feel more like quirky toys than fully usable terminals.