What is an Operating System?
An operating system (abbreviated OS) is a collection of computer software that makes a computer machine usable for practical purposes. For example, Windows, MacOS, and Linux Mint are operating systems for desktop computers, while iOS and Android are operating systems for smartphones.
Why are Operating Systems Necessary?
When you buy a computer, what you're buying is the physical components of the computer, also called the hardware, such as the CPU, the GPU, the sound card, the Ethernet card, the RAM memory, the HDD, the SSD, the monitor, among other components.
Each of these components can work in a variety of ways. As a simple example, larger screens can fit more things in them than smaller screens. A drawing tablet has to work just like a mouse, even though it's a completely different device. And in the future, there could be more variations, more things than anyone can imagine.
In order for a computer to work, it has to be able to save and load files. These files are saved to HDDs and SSDs, but these two components don't even know what a file is. HDDs and SSDs store data in fundamentally different ways, one uses electromagnetism, the other uses chemistry, but we need to be able to take a file from a HDD and just copy it to a SSD or vice-versa without any problem.
In order to do this, we need an entire system of programs. We need programs called drivers, which know how to communicate with the hardware components and can tell what they're capable of doing. We need a program that can provide a common interface to those drivers, so that saving data works no matter what driver we use. And we need something that know what a file is. This last one is a program that implements a filesystem, such as NTFS or EXT4.
And this is just for files. We need something similar for displaying things on screen, for playing audio, for handling keyboard input, for dealing with user accounts and passwords, for dealing with Internet, etc.
An operating system is a collection of programs that can at minimum handle all these basic tasks.
Why a Windows Program Doesn't Work on Linux?
Because different operating systems have different programs to handle basic tasks, a program made to work with one operating system doesn't necessarily work with a different operating system, specially if they depend on a program that's part of the operating system.
For example, a program made to work on Windows that depends on functionality found in the File Explorer can't work on any Linux-based operating systems because there is no File Explorer on Linux. File Explorer is a Windows-only program. There are other file managers on Linux, but no File Explorer.
In these cases, the program can still work on multiple operating systems (called a crossplatform program) if they don't depend directly on a program of the OS, but instead depend on a program or subprogram that conditionally depends on a program of the OS.
For example, wxWidgets is a crossplatform GUI library. If an application is made with wxWidgets, and it's compiled for Windows, it will use widgets that are built into the Windows OS. If it's compiled for Linux, it will use GTK widgets which are built into some Linux OS's.
Alternatively, it's possible to make a Windows program work on Linux by inserting a program between Linux and the application that emulates Windows behavior. Such program is called WINE. WINE has the ability to display Windows widgets on Linux, so if all a Windows program needs are those widgets, then it can run on WINE, but if it needs something that Windows has and WINE doesn't have, then it won't work.
Many applications nowadays are created using web technologies (HTML, CSS, Javascript), because then they can just use a web browser to display their GUI, e.g. Discord, Spotify. In this case, the platform is no longer Windows or Linux, but "web," as they don't depend on functionality that comes from an operating system, but entirely on functionality of a web browser. More specifically, they actually depend entirely on what one specific web browser, Chromium, supports, but we say it's "web" because everyone uses Chromium-based web browsers anyway.
Leave a Reply