How to extract .xz files?


#1

I can extract .tar.xz files with xf parameters below:

$ tar xf file.tar.xz

But, what is the correct way to extract single .xz files in console?


#2

You have to install xz-utils package first:

$ sudo apt-get install xz-utils

You can use unxz command to extract .xz files:

$ unxz file.xz

or using with --decompress option of xz:

$ xz --decompress file.xz

"How to extract .xz files?" was flagged as spam
#3

tar xvfJ filename.tar.xz
tar support .xz from version 1.22 onwards.
please update the version

Regards,
Christian