How to extract .xz files?

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?

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

tar supports .xz from version 1.22 onwards, please update the version

$ tar xvf filename.tar.xz

Regards,
Christian