Actually, I'm not even sure why csx files exist in Windows, much less why anything like them is so important on other OS's.
From the sound of it, a close equivalent might be Groovy.
But in truth, I kind of suspect that a lot of the reason for .csx is that until PowerShell came along, the Windows command shell/scripting environment was very, very feeble.
In contrast, the Unix and Unix-like OS's have always had very powerful shells and a rich set of support tools such as grep, sed, awk, perl, and the like plus frameworks like Tcl. And more recently, Python, among others. Most of these can be acquired for a Windows machine, but in the *n*x OS's, you can consider them as standard and not have to pull them in from third-party sources.
An IDE is no substitute for an Intelligent Developer.
It is a Roslyn based interpreter that lets you do REPL based programming in C# similar to other REPL languages. CSX files are used with csi.exe which is the interactive C# REPL. There is a window in Visual Studio called "C# Interactive" that lets you run this as well. If you want to interactively program with a REPL, use csx files. OR if you want to make quick snippets to interact with both your Visual Studio and as a command line.
In the .NET world, lots of people still use LINQPad to do ad-hoc exploration and execution in .NET languages. But this was because there was no REPL to do quick, ad-hoc programming. However LINQPad is God-like when you are exploring data interactively.
CSX files are not a replacement for Powershell or a replacement for the old Windows Scripting Host(VBScript or JScript)
How did Java programmers not commit suicide using Date() from Java 1-7?
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it: