this post was submitted on 03 Sep 2024
138 points (97.3% liked)

Linux

47990 readers
1028 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Ever had a question about Linux but felt too afraid to ask? Well now's your chance, ask any question about Linux, no matter how noob or repeated it is, and I and others will help answer them.

Previous noob question thread: https://lemmy.ml/post/14261893

you are viewing a single comment's thread
view the rest of the comments
[–] Occhioverde@feddit.it 3 points 2 months ago* (last edited 2 months ago) (1 children)

For the #4, the file extension can be seen just as a note, a little tag that'll help you (or anyone else that will receive your file) remember which program you should use to successfully open the file.

From the viewpoint of your computer, in fact, a file is just a sequence of bits and every program can open every file, only it will not be able to find what it expects and actually do something useful with it, just as you can open a book written in any possible language: in most cases you will unable to undestand it, in some others you will be able to read it without any problem.

The "concept" of extensions was than introduced to allow your file manager (Explorer for Windows, Finder for macOS, Dolphin for KDE or Nautilus for GNOME) to know which program to launch when you double click on a certain file through a simple association table (that you can edit in your system preferences).

In regards to Linux you can sometimes read that file extensions are not a thing, but this is just because in the commandline you launch a specific program that you personally point to a certain file, so there is no file manager that needs to guess which app should be launched to open the document you just double clicked on.

That said, I think that should be pretty clear that in a Desktop context (like in a Personal Computer) that double click on a file situation pretty much applies to Linux too, so extensions will be useful and respected by the file manager you'll find installed in your distro of choice, even if it can use other means when that is missing.

[–] yetAnotherUser@lemmy.ca 2 points 2 months ago (1 children)

I'm afraid this answer isn't 100% correct. There are ways to find out a file's type beyond looking at an extension. For example, there are lots of file formats where all of the files start with a specific sequence of bites, known as a file signature (or as "magic bytes" or "magic numbers").

You can try the file command line tool to check that you can find out a file's format without resorting to its extension, and you can read the tool's manpage to learn how it works.

[–] Occhioverde@feddit.it 4 points 2 months ago

Yes, I know about them and always prove extremely useful every time I receive a file with a wrong/no extension and have little clue about its content. But since the question was about how OP could work with "files with extensions" produced in Windows, I wanted to help clarify what are they, why they are used and that files do not need to be converted or whatever to be opened in Linux as it can "work with them" just fine.