What is DNX ?
Why ASP.NET can be run on cross platforms ? It relies on DNX.
DNX: .NET Execution Environment.
For easily understand DNX, just think about Mono, which supports .NET in Linux system. Yes, DNX could compare with Mono.
What is DNX?
The .NET Execution Environment (DNX) is a software development kit (SDK) and runtime environment that has everything you need to build and run .NET applications for Windows, Mac and Linux. It provides a host process, CLR hosting logic and managed entry point discovery. DNX was built for running cross-platform ASP.NET Web applications, but it can run other types of .NET applications, too, such as cross-platform console apps. (from ASP.NET docs)
About how to install DNX on different OS, and how to work with ASP.NET, please see this page on github.