Yes, GameMaker Studio 2 (GMS2) can be used to develop games on Linux through its Ubuntu export option. However, there is no native GameMaker IDE for Linux; the GameMaker Studio 2 development environment itself only runs natively on Windows and Mac OS X.
To create a game for Linux in GameMaker, you would typically use the GameMaker Studio IDE on a Windows or Mac machine, then choose the Ubuntu export option to compile your game for Linux systems. You need to own the appropriate export module to do this.
Here's an example of how you might set up the Ubuntu export for a project:
Remember, while exporting to Ubuntu (Linux), you need to ensure that all your game assets and features are compatible with Linux systems. Testing your game on various Linux distributions will also be important for ensuring compatibility.
Furthermore, developers often use tools like Wine or run virtual machines to simulate Linux environments for testing purposes or even to run the GameMaker Studio IDE itself if necessary. Keep in mind that using Wine or a VM may introduce its own set of challenges and may not be officially supported by YoYo Games, the developers of GameMaker Studio.
In case you want to develop directly on Linux, you might need to look into alternative engines that support Linux natively, or use a virtual machine or compatibility layer to run GameMaker Studio.