how to unzip or extract 7z file in Linux?  Explain it with an example. In this blog we will learn 7z archive extraction from Linux terminal with step by step instructions.

To unzip or extract 7z file in Linux we need p7zip Linux utility. To install p7zip utility we are going to use apt-get package manager. Open Linux terminal and type sudo apt-get install p7zip

how to unzip or extract 7z file in Linux

See p7zip Help manual

bosch@bosch-Inspiron-N5050:~$ p7zip --help
Usage: /usr/bin/p7zip [-d] [-h|--help] [file]

    -h print this help
    -d decompress file

how to unzip or extract 7z file in Linux example

  • Open Linux terminal after installing p7zip ( described as above)
  • Go the directory where is your a7z archive,  for example my archive is at /home/bosch/Downloads/myzip by command

          cd /home/bosch/Downloads/myzip

  • extract the archive using command
bosch@bosch-Inspiron-N5050:~/Downloads/myzip$ p7zip -d documentation-dump.7z 

7-Zip (A) [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: documentation-dump.7z

Extracting  license.txt
Extracting  readme.txt
Extracting  contributordeletionreasons.json
Extracting  contributors.json
Extracting  contributortypes.json
Extracting  doctags.json
Extracting  doctagversions.json
Extracting  examples.json
Extracting  topichistories.json
Extracting  topichistorytypes.json
Extracting  topics.json

Everything is Ok

Files: 11
Size:       293380265
Compressed: 37098278

How to Create a 7zip compression file in Linux

  • put all files and folders to zip or compress.
  • Run command
bosch@bosch-Inspiron-N5050:~/Downloads$ 7z a myzip.7z myzip
  • 7z is a command and a is switch to add.
  • After completion we will get myzip.7z file archive.


Related Contents to follow