Tips for a Unix like setup on Win boxes

This little post sums up how I like to set up my Windows 7 installation for basic development, excluding the usual Java setup (SDKs, IDEs, etc). The setup will enable you to develop in pretty much the same fashion whether on Linux, Mac or Windows. (A good thing, IMHO).

As an absolute first, you need to get a hold of Cygwin, which according to its own description is a

Linux-like environment for Windows making it possible to port software running on POSIX systems (such as Linux, BSD, and Unix systems) to Windows.

Windows has its own new Powershell, but for anyone coming from Unix land the Cygwin is a better alternative as you do not need to learn anything about .NET scripting to use it propertly. All your usual script that run on Mac or Linux now runs on your Windows machine as well. The one annyoing thing is that it runs inside of the command prompt in Windows that really hampers you choice of fonts, as well as limiting the width to something like 80 chars when maximized. Too old skool for me, but that’s something the next install fixes 🙂

Secondly you should get Console, which is a replacement for the built-in console in Windows. It provides multiple tabs, transparency, configurable font, ++, but one thing it does not provide is a shell. This is a good thing™ though, as this lets you choose between cmd.exe and for instance … Cygwin’s bash! See this link for how to replace cmd.exe with bash. And of course, there is no limit on the width of the console as in Windows 🙂

The last step is only essential for Vim addicts and deals with configuring the Windows gui port of Vim to play nicely with Cygwin. You have the possibility of installing vim inside of Cygwin, but I like the gui version better (although it is not nearly as nice to use as the MacVim version on OS X). To get vim to open I have made an alias in ~/.bashrc like this alias vim='"/cygdrive/c/Program Files (x86)/Vim/vim73/gvim.exe"'. Unfortunately, opening vim from within Cygwin makes vim look for its settings in $HOME/.vimrc or $HOME/_vimrc. Easily fixed though, just create a hard link to your existing settings that lies in your Windows user folder: ln /cygdrive/c/Users/MyUserName/_vimrc $HOME/.vimrc


One Response to Tips for a Unix like setup on Win boxes

  1. Carl-Erik sier:

    Nå til dags er ConEmu også et godt alternativ til Console2.

Legg igjen en kommentar

Fyll inn i feltene under, eller klikk på et ikon for å logge inn:

Du kommenterer med bruk av din konto. Logg ut /  Endre )


Du kommenterer med bruk av din Google+ konto. Logg ut /  Endre )


Du kommenterer med bruk av din Twitter konto. Logg ut /  Endre )


Du kommenterer med bruk av din Facebook konto. Logg ut /  Endre )


Kobler til %s

%d bloggere like this: