List of file extensions

This is a list of common file extensions. Keep in mind that extensions are arbitrary and, whenever there's any doubt, the file command will generally provide a more accurate indicator of file contents than the extension.

0-9

 * .1, etc. - man pages generally fall into numerical categories (though there are others) and have a suffix indicating the section. Logrotate also names old log file with an extra numerical extension.

A

 * .asm - assembly language source code
 * .au - Sun audio file

B

 * .blend - Blender 3D scene
 * .bmp - Bitmap image format
 * .bz2 - a file processed with bzip2 compression (see .tar)

C

 * .c - C source code
 * .class - Java class, compiled bytecode
 * .conf - configuration file
 * .cfg - configuration file
 * .cpp - C++ source code
 * .cc - C++ source code (not as common as *.cpp)
 * .css - CSS, Cascading StyleSheet
 * .csv - a plain text file containing comma separated values

D

 * .db - Berkeley DB
 * .deb - Debian package
 * .desktop - Desktop entry, standard link/shortcut/launcher format
 * .diff - patch/difference file generated by diff
 * .dtd - DTD, Document Type Definition for XML data

G

 * .gif - image file which uses the patented LZW compression algorithm
 * .gz - a file processed with gzip compression (see .tar)

H

 * .h - header file
 * .html/*.htm - HTML

J

 * .jar - Java Archive zip compressed file containing Java classes/sources
 * .java - Java source file

K

 * .kwd - KDEs native format for their Kword word processor
 * .ksp - KDEs native format for their Kspread spreadsheet application
 * .kss - KDEs screensaver format

L

 * .log - logging data from some application, usually in plain text format

M

 * .m3u - playlist file, originates from WinAmp
 * .m4a - compressed MPEG-4 audio file without DRM
 * .m4p - compressed MPEG-4 audio file with DRM
 * .md5 - file containing an md5sum for a single file. IE: foobar.iso.md5 contains the md5sum for foobar.iso
 * .md5sums - file containing a list of MD5 checksums, generated and used by md5sum
 * .mo - Compiled message catalog, generated and used by GNU gettext
 * .mpg or .mpeg - compressed video file
 * .mp3 - compressed MP3 audio file

O

 * .o - object file. Source code that has been compiled but not linked
 * .ogg - Ogg Vorbis sound file

P

 * .patch - patch file, generated by diff, to be used with patch
 * .pdf - PDF, Adobe Portable Document file.
 * .php - PHP source file
 * .phps - PHP source file in which the source is intended to be displayed rather than executed
 * .phtml - PHP source file (uncommon)
 * .pl - Perl source code
 * .pls - a playlist file (file of filenames or URLs)
 * .png - PNG image file
 * .pov - source code for the povray ray tracer
 * .properties - value containing configuration values, used by Java applications
 * .ps - postscript file. Like pdf, but without form functionality.
 * .py - python script
 * .pyo - python optimized bytecode
 * .pyc - python compiled bytecode

R

 * rc - not really an extension, but often found at the end of 'run control' (or 'resource configuration') files such as 'bashrc'.
 * .rdf - "Resource Description Framework" file, XML based format
 * .rpm - originally a Red Hat package (the RedHat Package Manager) but now many distros are rpm based.
 * .rtf - rich text format. A Lowest common denominator format for exchanging documents between different word processors

S

 * .s or .S - assembly language source code
 * .sh - shell script (as with nearly all extensions, this is optional)
 * .so - Shared object/library file

T

 * .tar - a file archived with tar (the tape archiver) - often also compressed with gzip, bzip2, etc., in which case it will have a double extension of 'tar.gz', '.tar.bz2', etc.
 * .tgz - possibly a .tar.gz file with the shorter extension but more likely these days to be a Slackware package like a .deb or .rpm
 * .tga - Targa image file
 * .ttf - TTF (True Type) font
 * .txt - plain text file.

W

 * .wav - uncompressed audio format

X

 * .xbel - XML based bookmarks file
 * .xsd - XML Schema
 * .xml - XML file
 * .xsl - XSL stylesheet
 * .xpm - X pixmap

Z

 * .Z - rarely seen anymore, a compressed file, often tarred as .tar.Z
 * .zip - Compressed Archive. More common on Windows, but can be read/written on UNIX using zip and unzip commands