# What type of file is this and how do I view or edit it under Linux?

Simply double-clicking on a file will often open it in the correct program.

If your file does not have an extension, or seems to have the wrong extension, use the file command to let the system take a guess at what type of file it is. Syntax is file filename

If unsure how to use any of the programs in this table, use the man command e.g. man bunzip2

File extension Type of file What application to use to view it
.bz2 Compressed bunzip2 to uncompress it
.doc MS Word Document libreoffice or antiword
.docx MS Word Document libreoffice or docx2txt
.exe Windows execuatable Run on a windows computer, watch out for a virus
.gz Compressed gunzip
.jpg/.jpeg Picture xv
.pcx Picture convert filename.pcx filename.jpg ; xv
.pdf PDF text document evince or acroread
.ppt PowerPoint Presentation libreoffice
.ps Postscript ghostview or gv
.rtf Rich Text Format libreoffice
.tar Archive tar xvf
.tar.gz compressed archive tar xzvf
.uu uuencoded, need to uudecode to see its type uudecode