MinC Is Not Cygwin
160 comments
·April 23, 2025ryao
thingfish
You're right. I'll change it to "Windows XP or later".
bandrami
IDK, I wouldn't be surprised if it ran on Windows 2000 (still the best OS Microsoft ever made)
haglin
Yeah, Windows 2000 was probably the best operating system Microsoft ever produced. It had no crashes, a snappy/intuitive/sleek user interface, and DirectX support for games. I am currently running Mac OS X because I never liked Windows XP/Vista/10/11.
In hindsight, the progress Microsoft made in the ten years between Windows 3.0 (1990) and Windows 2000 seems incredible. They transitioned from a 16-bit shell running on top of DOS to a fully-fledged operating system with a hardware abstraction layer, preemptive multitasking, permissions, a registry, proper device drivers etc.
Twenty-five years later, there has been basically no progress.
At a minimum, I would have expected something like the Knowledge Navigator
heavensteeth
right, I suspect "NT" is the category they're looking for.
tomrod
Hilarious that this was literally my exact thought.
guerrilla
What's wrong with 2003?
dimava
Also you are confusing Visual Studio and VSCode
tomrod
Win2k?
zoobab
"later" is for lazzy developers.
Better list the complete list of versions where it has been tested, like "Windows XP/7/8/10/11"...
NikkiA
It might run on 3.1 and 3.11 via win32s, there were occasional odd things that would run on the win32 subsystem as was adapted to 3.1/3.11, but not 95/98/ME.
JdeBP
ryao's above proposition is the converse, that only Win32s in DOS+Windows ME was adequate to running this, and that the prior Win32s in DOS+Windows 98 and DOS+Windows 95 was not.
To be honest, though, I very much doubt that anyone has fully tested either that claim or what the headlined article itself claims. A quick look at the source turns up things that require the full Windows NT security model, wide character versions of the API, and threads.
It probably does not run on any version of DOS+Windows, and "except Win95 and Win98" in the headlined article is likely a fumbled way of saying that, which didn't account for those not being the only versions of DOS+Windows that exist.
skissane
> ryao's above proposition is the converse, that only Win32s in DOS+Windows ME was adequate to running this, and that the prior Win32s in DOS+Windows 98 and DOS+Windows 95 was not.
Win32s was for Windows 3.x only
Win32 for 9x/Me was originally called Win32c, but then Microsoft renamed it to just plain Win32, despite the fact that name was shared by the much more complete NT-based implementation.
skissane
> It might run on 3.1 and 3.11 via win32s
It won't. I see lots of calls to CreateThread/etc in the source. Win32s didn't support threads.
gwbas1c
I wish there was a date on that page.
Today in 2025, "It runs on all versions of Windows, except Win95 and Win98" comes across as a poetic way to say "we make an effort to support older computers running older versions of Windows."
quietbritishjim
Sounds very interesting but it's quite short on details. If it's not Cygwin, then what is it?
> MinC is a tiny kernel which runs on Windows. The rest of the software was taken verbatim from OpenBSD, version 6.1. This means that by installing MinC, you run OpenBSD on your Windows machine at native speed.
How does it run this kernel? Presumably (?) it's running in user space, so how do these other tools communicate with it? Are they native(ish) Windows binaries like those built for Cygwin?
I suspect this could be an ingenious technical achievement but it's just hard to tell what exactly it is.
delta_p_delta_x
> If it's not Cygwin, then what is it?
Looking at the source code[1], it appears to be analogous to MinGW in the MinGW:GNU/Linux:Windows relationship, but replace with MinC:BSD:Windows. In other words, a minimal user-mode layer that presents BSD headers (and therefore BSD symbols, macros, and types), libraries, and core utils to end-users, thus abstracting over MSVC†.
EDIT: replace 'MinGW' with 'Cygwin' above. So it is Cygwin.
I'd say calling it a 'kernel' is quite a stretch—there is not much that runs in kernel-mode, and everything runs atop the NT kernel which does the actual 'kernel'y stuff.
[1]: https://github.com/dboland/minc
†: Until one wants to use very recent and very nice Microsoft libraries[2][3], and these fail spectacularly because MinGW doesn't know about nice MSVC-specific stuff like SAL annotations[4].
[2]: https://github.com/microsoft/wil
[3]: https://github.com/Azure/azure-sdk-for-cpp
[4]: https://learn.microsoft.com/en-gb/cpp/c-runtime-library/sal-...
quietbritishjim
> Looking at the source code[1], it appears to be analogous to MinGW in the MinGW:GNU/Linux:Windows relationship, but replace with MinC:BSD:Windows. In other words, a minimal user-mode layer that presents BSD headers (and therefore BSD symbols, macros, and types), libraries, and core utils to end-users, thus abstracting over MSVC†.
Are you getting MinGW mixed up with Cygwin?
MinGW does not emulate Unix-style APIs on Windows. (Actually I think there are exceptions but that is not its general purpose.) Instead, it is a port of tools aimed at Unix-like OSs (e.g., Make, GCC) to Windows so that they can be used to build source code that is already targetted at Windows. For example, source code compiled with MinGW might include a call to the Win32 API CreateProcess(), but cannot include a call to the Posix API fork().
Cygwin, on the other hand, allows compiling source code intended for *nix to native Windows binaries. For example, it compile code that calls fork(), getuid(), stat(), etc. It has that user-mode emulation that you mentioned (e.g. mapping between Unix-style UIDs and Windows SIDs), which happens in cygwin1.dll.
delta_p_delta_x
> Are you getting MinGW mixed up with Cygwin?
I think you're right, this is probably the BSD equivalent of Cygwin.
That being said... I feel the distinction is very blurred, and even more so with the inclusion of MSYS. It seems very few people use naked MinGW, despite a few distributions[1][2] being available.
For instance, MinGW also provides `unistd.h` and `pthread.h` on top of `windows.h`. Certain distributions of MinGW provide lib{std}c++ instead of MSVC STL. Where does 'build native Windows executables from source files that are already targetted at Windows' stop, and 'allows compiling source code intended for *nix to native Windows binaries' begin?
Also, based on my comment above, MinGW doesn't do a great job at 'already targetted at Windows', because some very core libraries that rely on fundamental Windows-y constructs don't work. Personally I avoid it because of its incompleteness, and just use straight `clang++.exe` from the Windows LLVM release[4], aside a full install of the Windows and MSVC SDKs.
[1]: https://github.com/skeeto/w64devkit
[2]: https://github.com/mstorsjo/llvm-mingw
[3]: https://github.com/llvm/llvm-project/releases/download/llvmo...
regularfry
I think it's a "kernel" in a similar way that user-mode linux is a kernel, right? It's not, but it looks like one to the programs it runs.
amiga386
Cygwin is WINE in reverse. It provides POSIX APIs in a Windows DLL, and the implementation tries to map them immediately to Windows API calls. You should then be able to take source written for Unix and you should be able to compile it and have it run on Windows.
MinGW is a GNU toolchain for writing Windows-native software... that happens to be used quite often to compile Unixy non-Windows software, so they added MSYS which is derived from Cygwin and works like Cygwin (a DLL providing POSIX APIs implemented using Windows APIs), to make it easier to compile and run Unixy software unmodified.
WSL is a VM that runs your choice of Linux kernel and distro as a guest OS, and adds integrations with the host system that make it seem much more native than it really is.
kevin_thibedeau
WSL2 is a VM. WSL1 is Wine in reverse. They run ELF binaries compiled against the Linux ABI. Cygwin/Msys is a Posix compatability layer for PE binaries.
ryao
I thought WSL1 implemented Linux's ABI in the NT kernel and uses a Linux userland. Wine reimplements the a Windows userland and emulates NT kernel services in userland. The two do not seem the same, although the intention of running Linux software on Windows is the opposite of the intention of letting UNIX system run Windows applications.
haolez
This is WSL2, right? I had the impression that WSL1 provided a better experience, but it was too complex to maintain and Microsoft decided to take the easy road.
wvenable
> but it was too complex to maintain and Microsoft decided to take the easy road.
The insurmountable problem was file system semantics. In Linux, files are dumb and fast. On Windows, files are smarter and therefore also slower. Linux applications expect dumb fast files and they produce a lot of them. Mapping Linux file system calls to Windows file system calls is doable but you can't overcome that difference.
At that point, simply virtualizing the Linux kernel itself is an obvious better solution long term.
mikepurvis
Yes WSL2 is a mini-VM. Having used both, I don't think it's a slam dunk that 1 was better, really just different.
Particularly for the more complex cases of container APIs, GPU access, desktop integration, etc. Those are solved problems in the VM space and reinventing new solutions at a slightly different layer is not necessarily wise or realistic.
pjc50
WSL1 mapped Linux file API calls directly to NTFS file API calls.
Unfortunately this was cripplingly slow for use in e.g. Git, so they moved to a model which is more of a VM.
emulio
> it was too complex to maintain and Microsoft decided to take the easy road.
This is a common confusion. WSL1 is not deprecated, and both WSL1 and WSL2 continue to be developed and supported in parallel by Microsoft.
This is example of bad Microsoft marketing. Maybe they should have added a postfixes instead of numbers: "WSL-native" "WSL-VM" or something like that
thingfish
I started out by creating a dll file with all the system calls implemented. Later I learned how a kernel actually works. So I rewrote it, emulating an interrupt to run in a separate kernel space. Could you name some of the details you want described?
skybrian
What you said here is helpful.
Maybe start with an explanation of what it does without referring to Cygwin? That would be for people unfamiliar with Cygwin. Edit: actually you already did that, but starting off with “not Cygwin” is confusing.
You could also explain how your approach differs from Cygwin, for people who do know it.
quietbritishjim
> I started out by creating a dll file with all the system calls implemented. Later I learned how a kernel actually works. So I rewrote it, emulating an interrupt to run in a separate kernel space. Could you name some of the details you want described?
"to run in a separate kernel space" You emulated those interrupts, and they really run in a separate kernel space [1]? Or you mean it's emulated as if it runs in a separate kernel space?
If it's really running in kernel mode, as you are literally saying, how is it doing that? Is it running in some virtual machine manager like Hyper-V or as something like a driver in the Windows kernel? How does it interact with the hardware e.g. does it access the same file systems that Windows does, and how does it coordinate that?
Looking at the source code I don't see any references to the Windows WDK / DDK (driver development kit) but a lot of references to user-space Windows API functions. I also don't see most of the actual BSD kernel [2]. For example, could you point me at the process/thread scheduling code (like sched_bsd.c [3])? Are you sure it's a kernel? Are you sure it runs kernel space, not user space after all? It seems like it might actually be an abstraction layer that emulates the user-space BSD system calls but runs in user-mode and make use of (only) the Windows kernel. If so, what do you mean by "emulating an interrupt" - how are you intercepting them? If you're just providing the C API functions to link into the application, and that don't actually trigger those interrupts at all, that is something a lot less ambitious. Still something impressive and worthwhile but you're setting readers up for disappointment if you describe it as something that it isn't.
That is what Cygwin does by the way. It implements POSIX APIs in user space. It does not claim to be a kernel (because it's not) or to run in kernel mode (because it doesn't). The thing is, I can understand you may have chosen the name "MinC is not Cygwin" because it works in roughly the same sort of way as Cygwin but is a different implementation. But the name, along with the description as being "a tiny kernel", suggests that it's not Cygwin because it works in a fundamentally different way, i.e., running the actual BSD kernel in actual kernel mode.
[1] https://en.wikipedia.org/wiki/User_space_and_kernel_space
[2] Mirror is available at: https://github.com/openbsd/src/tree/master/sys/kern
[3] https://github.com/openbsd/src/blob/master/sys/kern/sched_bs...
somat
Very cool project, what did OpenBSD do post 6.1 that interfered with the project tracking later versions?
By which I mean, completely understandable to pick a version and stick with it. If I were trying to develop a tricky layer replacement that is what I would do. However it is also tempting to try to follow upstream. I wonder if one of obsd's infamous breaking innovations actively interfered with the project.
For those unfamiliar, where Linux has a "don't break user land policy" and this is fine and good for a project like linux. It does mean that the linux project is terrible at handling needed user land breaks. Where OpenBSD's policy is more "we got really good at breaking user land" They are so good that most of the time the users don't notice. But I would not want to try and ship closed source commercial software targeting obsd.
dolmen
Nowadays, if I wanted to port Unix (non-GUI) software written in C to Windows I would first try to compile it with the Cosmopolitan LibC.
m2f2
How long will cygwin lifetime be?
A proud cygwin user myself, with cygwin in the PATH since the 2000s, I recently sideloaded Ubuntu under wsl.
Right now, wsl is my primary terminal app, I've mounted C:\ as /c, added a symlink to bypass the ugly Onedrive default name, and... I'm happy.
Slowly, I removed 90% of the mixed BAT scripts, converted to bash the rest, and I now enjoy it.
As the old timer that I am, I limp around powershell, so no luck with that.
Cygwin on the other hand seems to be slowly dying, as more and more packages are now unsupported/unmaintained, with Redhat apparently willing to smother it at the first viable moment.
Any thought?
38
as a former long time cygwin user, my advice is dump cygwin ASAP. its not really good for anything anymore. the only reason I ever used it was for a C compiler, but Zig does that way better than Cygwin ever did. also honestly I don't even use C anymore unless I need to, I write most stuff in Go, but both Go and Zig can cross compile. finally I am using windows terminal and PowerShell
dist-epoch
git-for-windows (the default Windows git client) includes a bash.exe and a selection of gnu utils.
it's based on MSYS2, so it's native. maybe you should check this one out.
mananaysiempre
GfW is remarkably hostile to installing any additional components (e.g. I’ve needed to get ahold of rsync), especially compared to normal MSYS2, which is as flexible as any Linux distro.
colordrops
I'm using the nixos wsl image and a majority of my linux workstation setup was just installed with almost zero effort. happy and impressed. Using the Ameliorated.io debloater plus nixos wsl makes Windows almost tolerable.
jdndndb
I don't get the negativity in this thread. Looks like a cool project, keep up the good work
thingfish
I don't mind. Many of the comments are about my incorrect use of the term Linux. In a way, they are right. But if one wants to teach Automotive Technology to future BMW mechanics, you start them working on a VW Beetle. Wax on wax off.
kergonath
> I don't mind.
That’s good. It’s an interesting project and the discussion here is overall very interesting. Thanks for posting it.
oblio
You're wrong, it should be BMW Beetle.
:-p
mrweasel
It might be because it's a teaching tool, but the introduction contains a lot of fundament misunderstandings and factual mistakes.
Take networking, one of the screenshots shows the output of ifconfig. That teaches you almost nothing about Linux networking, because ifconfig in Linux and OpenBSD are two very different tools, and you'd probably not teach people to use ifconfig on a modern Linux distro. Same for the boot process... rc and systemd are not the same, not even close.
It is a very cool project but almost all references to Linux is wrong.
skrebbel
> almost all references to Linux
The word "Linux" only occurs on the page once.
smcameron
Which is weird, because the stated purpose of MinC is: "MinC was written to help children at vocational education learn Linux without the hassle of virtualization." And it does this by running OpenBSD on Windows? That's really strange. Why not just run linux if the goal is to teach/learn linux? Perhaps the actual goal is not well stated, or I misinterpret what is really meant by those words.
gkfasdfasdf
Ok so it's not Cygwin, how is it better (or worse) than Cygwin?
hatly22
I wish they'd include a datestamp in these intro pages. This looks like it could be from any era.
emmelaich
Agree. Looking at github, the most recent commit is yesterday and some are two years old.
nasretdinov
I think there used to be a similar project for Linux, called CoLinux. However using a BSD kernel probably is a more sustainable choice if anything because it's much smaller and simpler
zoobab
I used CoLinux back in the days, it was bluffing:
ryao
That is user mode linux. Cooperative Linux is something else:
https://en.wikipedia.org/wiki/Cooperative_Linux
Interestingly, Wikipedia claims that User-mode Linux inspired Cooperative Linux.
zoobab
"Under Windows Vista, I have installed Pubuntu, which is a distribution based on Ubuntu Hardy with a CoLinux kernel. Now I run User Mode Linux on top of CoLinux on top of Vista"
Maybe UML can run on top of MinC?
Does MinC accepts ELF linux binaries?
dev_l1x_be
> MinC is a Unix emulator for Windows, based on the OpenBSD operating system
If anybody wondering.
max_
Its such great recursive acronym. [1]
self_awareness
OpenBSD userland used to teach Linux?
Wouldn't it be better to either teach BSD with current toolset, or to use GNU tools to teach Linux?
int_19h
Given that this has build tools, can it run pkgsrc?
damnitbuilds
"MinC is a Unix emulator for Windows, based on the OpenBSD operating system. MinC was written to help children at vocational education learn Linux"
?
serbuvlad
At my University I heard things like "Linux is derived Unix, BSD variants are something else entirely". I think education people are confused in general about this topic.
thesuitonym
That's hilarious. It sounds like you know, but for anyone who doesn't, it's actually the opposite. BSD variants are derived from Unix--that's where the BSD comes from, it was the Berkley Software Distribution of Unix tools, that later implemented the rest of Unix so universities could use the same software without having to worry about licensing from Bell Labs.
Linux is something else entirely, a student's project to make a MINIX compatible kernel, usually packaged with the GNU operating system, which like BSD aimed to be Unix compatible, but notably is not Unix (It's right there in the name: GNU's Not Unix).
charcircuit
>usually packaged with the GNU operating system
It's usually packaged as a part of the Android operating system. GNU hasn't been the popular userspace for a long time.
blueflow
The operating system interface that Unix, BSD and Linux share is called POSIX. The term POSIX is not widely known, so people sometimes make up for it by using "Linux" in-place because it is the most popular implementation.
This explains people who argue that Android is not Linux, despite it featuring a Linux kernel and self-identifying as so: They are intending to say that Android is not POSIX.
We need to make POSIX (as concept/word) more popular.
m2f2
Especially to package writers that assume bash is available everywhere, hope that bin/sh is the same as bin/ksh...sed -i... not on unices, grep missing a ton of options....
Time to ask an AI ?
oblio
It's never going to happen. POSIX has been around for 4 decades now. The longer something is not popular, the lower its chances to ever become popular.
ryao
If you can get the exact quotes, please send them to Computer Stupidities:
As an obligatory warning, if you have never seen Computer Stupidities previously, expect to lose a day reading it.
thingfish
Yes. Teaching anything to children is to start simple. So I start with bare-bone UNIX. In their second year we move to Linux (all flavours). For their final exam in the third year, they must be able to use Suze Linux.
ryao
What is Suze Linux? Did you mean Suse Linux? I would suggest dropping Linux from the description since this has nothing to do with the Linux kernel. Perhaps you could write POSIX instead.
roelschroeven
Wouldn't it be easier to use WSL? Microsoft has done al the hard work in getting native Linux code to run on Windows. I don't know how bare-bones you want it to be, but if you install Debian in WSL without extra packages, that seems pretty bare-bone to me. And it seems to me you avoid unnecessary friction from switching from OpenBSD to Linux later on.
WSL requires Windows 10 or 11 though.
robohoe
And you’re still locked in the Microsoft ecosystem.
cess11
Installing WSL was much harder than 'download and double click EXE' when I last did it. The 'app' shop installed something botched I now can't easily get rid of and then I had to do a few Powershell incantations to actually get an install that boots a Linux-like terminal. If I had to use Linux under Windows more than a few hours per year I'd Hyper-V it instead.
I'd also guess 'telemetry' pumps out all one does in WSL, while this might leak less of what the kids are doing.
arka2147483647
Seems to me, that to some Linux has come to mean all things Unix-ly
actionfromafar
If you want to communicate to people wanting to learn "the linux" that this (to a close approximation) does this, with very few words, you could do worse.
After all, if you learned to do "linux" on OpenBSD you'd be pretty much at home on Linux, too.
It's a clever bit of SEO, too, mashing in Cygwin, Linux and OpenBSD in the copy.
technothrasher
I learned to do "linux" on SunOS 4.1, and I feel less at home on Linux and more like a guest in my grandchildren's house.
boutell
Huh. This was my entry point as well, but I find Linux very aligned with my feelings about the 4.1 experience, as opposed to Solaris which felt clunky and overbuilt. Of course this is purely subjective emotional stuff I'm talking about.
red_admiral
If you assume Windows machine as a starting point, you'll need to answer "Why not WSL?". I can think of good answers, but this would be good to document somewhere.
> It runs on all versions of Windows, except Win95 and Win98.
For some reason, I suspect it does not run on Windows 1.0 to 3.11 either. I also find it strange to think it would run on both Windows ME and Windows NT 3.5, while excluding Windows 95 and Windows 98. Windows NT 3.5 and Windows ME are nearly a decade apart. The Windows subsystem’s software support in Windows NT 3.5 would be a subset of Windows 95/98.