Take for instance:

cat /etc/passwd

Why doesn't this file have an extension such as *.txt*, *.dat*, etc? Or does an extension exist, but it's just being hidden?

Does this apply strictly to Unix-like systems?


2 Answers 2


There is no extension. There's no reason for one. This isn't unique to Unix. You don't have to have a file extension in Unix or Windows. Windows won't know what to do with the file if you double-click it, but the program that made it probably does.


Most (if not all) legacy non Unix file systems were having a file name composed of (at least) two parts, the file name itself and its extension. For example FAT was using a fixed length structure (8.3) where the delimiter dot wasn't stored. This structure still exists with newer FAT schemes. Unix was (AFAIK) the first OS to introduce file names with no extension specific storage or requirement. While extensions are used under Unix in several cases, like source code, objects, libraries, manual pages, etc., most Unix utilities and applications do not care and use different heuristics to figure out a file type.

  • 1
    FAT "long filenames", as well as NTFS, do not have a separate extension, either.
    – user1686
    Sep 13, 2011 at 7:37
  • Indeed, that's the reason why I wrote "were having a file name", not "have". Perhaps should I have written "had" by the way. NTFS was released long after Unix introduced "flat" file naming. On "modern" FAT, the underlying 8.3 structure is still present, long filenames are just an alias of the former.
    – jlliagre
    Sep 13, 2011 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.