A
7-Zip
file with the extension .7z
is a compressed file format that can be extracted using p7zip
tool in Linux
. p7zip
is available for most Linux
systems and can easily be installed at the terminal. Once installed, 7-Zip
files can then be extracted from the terminal or supporting GUI-based file explorer applications such as Nautilus
for GNOME
or Dolphin
for KDE
.Extract 7-Zip file in Linux:
- Install
p7zip
(optional, if not already installed). - Create folder where you want to extract the file onto (optional).
- Go to the target directory where you want to extract the file onto (optional).
- Extract using
p7zip
command.Decompressing a7-Zip
archive will delete its original file. Please make a backup if required. - View decompressed
7-zip
archive. - Right click the file on
Nautilus
orDolphin
to extract the file from the GUI.
From ArchWiki. Jump to navigation Jump to search. P7zip is command line port of 7-Zip for POSIX systems, including Linux. How to use 7zip on Linux command. 7zip is distributed under LGPL license as a free software to use. The version available for Linux is known as p7zip package. I am using Linux mint so the installation part of this tutorial would be most suited for Linux mint, Ubuntu and other debain Linux distributions while the examples are universal for any Linux distribution.
The 7Zip is an open source software available to compress and decompress files and folders into various formats. It can be easily installed on Windows 10 or later operating system because of the .exe file availability but when it comes to Linux like Ubuntu, Red Hat or other versions, it is not that much simpler for newbies. On Linux, you have to use the command line with some particular commands to install the 7-ZIP.
But why we install the 7-zip, as I told you it is an open source and free, and also one the best open source file archiving software with the highest rate of compression ratio better than WinRAR. The compressions formats it can support are GZIP, TAR, ZIP, 7z, XZ, BZIP2, and WIM formats. According to the 7-zip official website, the compression ration of 7Zip is 2-10% better than any other compression tool. It also supports the AES-256 encryption and self-extracting feature. Besides this 87 language support is also there. If you don’t want to install the command line version of 7ZIP then go for the graphical user interface one. Here is the tutorial on that install p7Zip Desktop GUI on Ubuntu Linux using SNAP.
Here, today, in this tutorial we let you know how to install P7-zip on Ubuntu Linux via command line plus how to use the 7-zip on Ubuntu.
- First of all, go to your Ubuntu operating system.
- Open the command terminal either searching manually through app search or just use the shortcut key Ctrl+Alt+T.
- Once the Command Terminal on Ubuntu opens. Use the update command given below.
- sudo apt-get update
- After updating run 7zip installation command on Ubuntu.
- sudo apt-get install P7zip-full
- The above command will instantly install the 7zip compression tool on Ubuntu from the Debian package sources.
- Now its time to see how to use the 7Zip to compress and decompress the files and folders on Ubuntu Linux. Follow the below-given steps.
Step 1: Check the 7Zip installation
First of all, we confirm, whether the 7Zip compression tool is successfully installed on our Ubuntu system or not. For that just on the Command Terminal type:
7Z
If you get output something like shown in the below screenshot then it means 7Zip is successfully installed and ready to work on your Ubuntu or Debian operating system.
Step 2: Compress file with 7-Zip using Ubuntu command line.
To use the 7Zip on Ubuntu to compress some file or folder we can use both command line interface and graphical user interface. First I let you know how to use the command line.
For example, I have a folder called eclipse-installer in my Downloads directory. So, I switched to that directory using the CD Downloads command.
So under the Downloads directory, I run the command ls -la which can show all available files and folder available under any directory. You can see that in the below-given screenshot.
Now, I got the folder which I want to compress. So, the command which we use to archive or compress folder is:
7z afolder name.7zfolder name
![Open Open](/uploads/1/3/4/3/134372165/745754663.png)
Replace the folder name with the name of the folder which you want to archive, just like we did. In the above command, the ‘a’ stands for the archive.
In the same way, if you want to archive some file, let’s say pass.txt is the file and we want to compress it; then the command will be:
It is very simple you just need to mention the 7z a command along with file name with .7z extension and the original file name that you want to compress.
Step 3: Check the compress file information.
After the compression of the file or folder, if want to check that 7z archived file information then run the below command along with the file name:
7z l file name
For example, here we compressed the folder named eclipse-installer and after archiving it became eclipse-installer.7z, so that command to see the information of this file will be:
Step 4: Decompress file using 7Zip on Ubuntu command line
Now above, we have successfully compressed a folder and also told you the way to archive the file. Here, we will Decompress the same file.
For decompression or extraction of any compressed file, the command is very simple
7z e filename
– ‘e‘ stands for extraction
– filename: mention the compressed file need to extract using 7zip.
So, if we want to extract the file which we compressed in this tutorial above then the command will be like this:
If you want to extract the file along with a full path or folder then use the x instead of e in the above command:
7z x foldername
so, in our case it will be:
Step 5: How to compress file & folder using Ubuntu 7zip GUI (Graphical user interface).
Yes, besides the command line interface the 7zip also support the Graphical user interface on the Ubuntu. In case, you are not using the minimal Ubuntu server with only command line interface then you can use this simple method of archiving the files and folders on Ubuntu or Debian using 7-Zip compression too.
Avg mac cleaner download. 1. Open the File manager on your Ubuntu Linux machine and go to the folder or file you want to compress and right click on it. And select the compress.
2. Select the .7z format and then click on the Create button. Beside the .7z you can also use the .Zip and .tat.xz compression formats to archive your file and folders.
Use 7 Zip To Open Dmg On Linux Bash 2017
Step 6: Extract files on Ubuntu using 7zip GUI
https://rfhkiei.weebly.com/download-spotify-songs-mac.html. To extract the compressed the right click on that and click on the Extract to… option.
Select the Destination, if it is other than the location of the file where already it is, otherwise just click on the Select button and the archived file of your’s will automatically get extracted/uncompressed.
How To Open .dmg File On Windows
So, in this way you can install the P7Zip or 7-Zip on Ubuntu or Debian Linux to compress & extract the files/folder both by command line and graphical user interface (GUI).
If you faced any problem while performing this tutorial, let us know, the comment section all yours!!
Other Useful Resources: