Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question 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 ?

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    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.

  3. #3
    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.

  4. $spacer_open
  5. #4
    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:
    file filename.mp4
    filename.mp4: ISO Media, MPEG v4 system, version 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts