How to open .xz file in Linux/Unix?

.xz is a lossless file compression program that uses LZMA2 compression algorithm. xz is sort of stripped down version of 7-Zip program, although it has its own file format .7z

.xz compresses single file input and does not bundle multiple file in single archive. It is therefore a regular practice to use an archiving technique along with .xz compression. In Linux/Unix it is popularly, tar.

How to open/decompress/extract .tar.xz file?

$ tar -xJf yourfile.tar.xz

-J is the flag to handle .xz files in tar program.

Although, modern tar program can automatically determine what compression technique is used and apply thereby. You can simply run the following and it should work

$ tar -xf yourfile.tar.xz

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.