Results 1 to 4 of 4
In windows, if I change the file extension, Windows cannot open the file. But in Linux, if I change the file extension, Linux can still open it. Why ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-24-2012 #1Just Joined!
- Join Date
- Mar 2012
- Posts
- 5
How Linux knows the right application to open a file ?
In windows, if I change the file extension, Windows cannot open the file. But in Linux, if I change the file extension, Linux can still open it. Why ?
- 03-24-2012 #2
It's a complicated subject. Since the Graphical User Interface is not
built in to Linux, you can get systems that have Gnome, KDE, or some
other desktop. In Gnome you associate files with apps by configuring
the nautilus file manager (I think). From the command line, file extensions
are irrelevant.
- 03-25-2012 #3Just Joined!
- Join Date
- Mar 2012
- Posts
- 5
But Nautilus can open unconfigured files without extension. For example, I removed the extension of a PNG file and copied it into another Linux computer. File can be still opened.
- 03-25-2012 #4Just Joined!
- Join Date
- Dec 2006
- Posts
- 36
Advanced file managers like nautilus do not rely on file extension only for file association. Every file has some information in it about its mime-type. You can reveal it using "file" command in shell. For example:
Output:Code:file filename.mp4
filename.mp4: ISO Media, MPEG v4 system, version 1


Reply With Quote
