How To Open .TBZ ( tar.bz2 ) File Under Linux / UNIX

Q. I’ve download ed .tbz file. How do I open .tbz file under Linux / UNIX operating system using a shell prompt or GUI application?

A. This is a tarball. A .tar or .tbz or .tgz file is commonly referred to as a Tarball, which is usually compressed to save disk space. Use tar command to open .tbz file.

ADVERTISEMENTS

First, open a terminal or shell prompt.

Extracts all files from a compressed Tar file of the name test.tbz or test.tar.bz2(bzipped file).
$ tar -xjf test.tbz

To extract to a specific folder called /tmp/test, use:
$ tar -xjf test.tbz -C /tmp/test

To view extracted file, use:
$ cd /tmp/test
$ ls -l

GUI tool 7-ZIP

7-Zip is a file archiver with the high compression ratio. The program supports 7z, ZIP, CAB, RAR, ARJ, LZH, CHM, GZIP, BZIP2, Z, TAR, CPIO, ISO, MSI, WIM, NSIS, RPM and DEB formats. It is a open source cross-platform file archiver, supports creation and extraction of Tar archives.

You can download 7-Zip here online.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
4 comments… add one
  • SIFE Nov 19, 2009 @ 11:14

    Salamo Alikom
    thx ,this help to extract FreeBSD package .

  • Unceus Aug 4, 2011 @ 1:58

    Thanks, very helpful.

  • bitlord Feb 21, 2012 @ 19:10

    You can do it this way as well. It also works for Solaris.
    bzip2 -cd files.tar.bz2 | tar xvf –

  • Human Aug 17, 2012 @ 7:20

    don;t mention the name of god. Thanks for this post. This is for SIFE

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.