How to Use 7-Zip on Linux

Save

7-Zip is a compression and archival format, originally developed for the Microsoft Windows operating system. A 7-Zip archive is a file that contains many other files, possibly compressing them to save space, and that preserves the directory structure where those files were stored at the time the archive was created. You can create and interpret 7-Zip archives on the Linux operating system.

  • Log into the computer as user "root." Launch a command shell, either by logging into text mode or by launching a terminal from the graphical desktop.

  • Install the Linux version of the 7-Zip file archivers. The specific way of performing this step depends on your Linux distribution. For example, for Debian or any distribution derived from it, such as Ubuntu, type the following command into the shell:

    apt-get install p7zip-full

    Press "Enter." Linux downloads the software package containing the 7-Zip utilities and installs them at the correct points in the directory structure.

  • Create a 7-Zip archive by typing the following command into the shell:

    7z a myarchive.7z file1 file2 ...

    Replace "myarchive.7z" by the filename you want for the archive being created. Replace "file1" and "file2" (you can add as many filenames as you want) by the names of the files that should be stored in the new archive. Press "Enter." 7z creates the archive.

  • List the contents of a 7-Zip archive by typing

    7z l myarchive.7z

    Press "Enter."

  • Extract the contents of an archive by typing

    7z e myarchive.7z

    Press "Enter." The archive does not change -- it still contains the same files -- and Linux creates copies of the extracted files on, or under, the current directory.

References

Promoted By Zergnet

Comments

You May Also Like

Related Searches

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!