Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How do I uncompress a tarball that uses .xz?

I'm used to extracting tarballs with a -xfz flag, which handles gzip and bzip2 archives.

Recently I've run into a .tar.xz file and I would like to uncompress it in one step using tar, how can I do that?
by

1 Answer

sandhya6gczb
Ubuntu includes GNU tar, which recognizes the format by itself! One command works with any supported compression method, per the manual.

tar xf archive.tar.xz
tar xf archive.tar.gz
tar xf archive.tar

etc. If tar gives a Cannot exec error, you may need to sudo apt install xz-utils first.

Login / Signup to Answer the Question.