Skip to content
User Avatar
#24
Auto-translated
Vayshan
For Windows, it's clear, but how does Linux recognize files?
by analyzing the content; there's even a special utility called "file," which is a standard shell utility in any Linux distribution. It identifies file types.
Vayshan

Let's say a regular text file opens with an editor (I don't know which one), and I want to use a different editor. How do I make the system recognize that specific text files should be opened with the editor I want, instead of the default one?

You're obviously referring to how to do this in a GUI, because in the console, there's no "default" – to open/run a file, you have to "tell" the system how and with what to do it. But in a graphical environment, you need to look in the settings and configure it, but there are many graphical environments, and it's different everywhere. Most often, you need to refer to the documentation if you can't find these settings by trial and error.
Vayshan

Isn't there an emulator for Windows programs? I think you can run .exe files in Linux...
There are emulators, but why reinvent the wheel when most applications are available for Linux, and emulators and virtual machines are probably only needed for games written for Windows. An .exe file is an executable file; in Linux, these files are also recognized as executable files that are processed by the kernel. But in applications, in addition to the executable files themselves, there are many other files necessary for the program to work. The problem is that programs written for Windows use Windows system libraries and functions and therefore don't work under Linux.

Думающий поймет. Действующий совершит. Дорогу осилит идущий ©

Statistics

Welcome our newest member: Фёдор Фёдорович