coLinux: running Linux from within Windows

Cooperative Linux (coLinux) is a very interesting project i stumbled upon a few days ago. The idea of this project is to allow a Linux Kernel to run at the same time (cooperation) with the Windows system instead of doing virtualization or emulation. The result is an amazing speed if compared to VirtualBox or other virtualization solutions expecially in I/O and network operations.

coLinux can run as stand-alone application (you get a console with working virtual TTYs) or as a system services. It can be insalled on Windows 2000, XP, Vista and Windows 7. Only 32bit mode is supported at this time but 64bit support is under work thanks to a $5,000.00 sponsorship they got.

Installing coLinux

Installation cooperative Linux is quite straightforward:

  1. download the colinux stable installer from sourceforge (8MB) and run the setup program, follow all the normal procedure for a Windows software;
  2. after setup download a pre-built Linux distribution from the same page, i choosed Debian 6 (35MB);
  3. extract the .7z archive with the distribution into the coLinux installation directory, be carefull that the archive is 35MB but after extraction the file will be 2GB;
  4. rename the extracted file as rootfs_2gb.img
  5. now execute squeeze.bat to run coLinux

Et voilà, you can now login as root with blank password:

Configuring coLinux

What you get out of the box is a very minimal system, you need to install all the extra packages you wish but with 2GB is quite a few space, so first of all you may wish to move your system to a larger partition. Luckly is not difficult and there are a few way to enlarge your default coLinux root partition to install more software.

After you’re done you can start installing all your favourites packages via apt-get.

The first things you maybe wants to setup are: network, keyboards, ssh, Windows drives or directories.

Configuring coLinux networking and ssh

coLinux network should work out of the box with the SLIRP driver that allow you to use eth0 interfaces via a TUN/TAP driver that gives access to internet but other machines on the real network will not able to access coLinux.

So, in order to access your coLinux system via SSH you need to configure port forwarding into the SLIRP driver. Its sounds complicated but in reality is quite easy. Edit the squeeze.conf file and change the line:




then shutdown and restart your system.

Is it advisable to use coLinux via SSH because the default console does not supports scrollback!

Configuring coLinux keyboard and locales

If you have a non-US keyboard is quite advisable to install the Debian’s keyboard layout packages and the locales data too.

This is super easy just install the packages:

apt-get install console-setup locale

Also if you want to change the console size to have something bigger then the default 80×25 screen you can add the following line to the squeeze.conf file:


then halt and restart the system again.

Accessing Windows directories from coLinux

Differently from other softwares, coLinux allow you to access windows drives and directories like a breeze. Everything you have to do is to configure your config file adding this line:


then halt and restart the system again.

Once the system has been configure you can mount this directory with the mount command:

mount cofs0 /mnt/ -t cofs

or configure /etc/fstab to automatically have it mounted at boot time just adding this line:

cofs0      /mnt            cofs    defaults          0 0


coLinux is not quite ready for running production services but can make the live of many Windows users that wish to run or try Linux very fast a breeze. If you want to have some LAMP application running or you want to do some C/Perl/whatever development it seems to be a good choice. If you have time you can also create a full running desktop system installing all the required packages and configuring a Windows X server or VNC to access it.