![zip folder ubuntu zip folder ubuntu](https://technastic.com/wp-content/uploads/2020/03/zip-files-in-Ubuntu.png)
When the Rar compression command finishes running, a RAR format archive will appear in the directory you ran the compression command. Lastly, you can compress all files in a folder.Ĭd /home/username/folder/where/files/are/ rar a my-rar-archive.rar * rar a my-rar-archive.rar /home/username/path/to/file.file Or, to compress a single file, execute the following command. rar a -r my-rar-archive.rar /home/username/path/to/folder/ Be sure to customize the commands to suit your needs. Using the command examples below, create a Rar archive. Once the Unrar app is set up on your Linux PC, you can use the unrar command to compress files.
#Zip folder ubuntu install#
Ubuntu sudo apt install rar Debian sudo apt-get install rar Arch Linux sudo pacman -S rar Fedora sudo dnf install OpenSUSE sudo zypper addrepo packman-x86_64 The reason that this program must be installed is that Unrar supports a proprietary format, and many Linux distributions don’t like that fact. To compress files in with the Rar utility in Linux, you must first install the program. Rar is a proprietary format, so this tool is incredibly useful if you have RAR archives on your Linux PC or know someone who uses the format. Rar is a free utility that allows those who install it to interact with the RAR archive format. RarĪnother way to compress files on Linux via the terminal is with Rar.
#Zip folder ubuntu how to#
However, you can learn more about how to use Tar to create archives, execute the –help command below. We’ve just scratched the surface of what you can do to compress files. Suffice it to say the Tar command is incredibly versatile. Tar -czvf /home/username/path/to/file/or/folder/ The command below will compress absolutely everything in the “Documents” folder.ĭon’t want to compress everything in a folder? Only want to compress a specific thing? Try this command instead. Once the terminal is in the “Documents” directory, you create a new TarGZ archive. In this example, we will be using the “Documents” directory.
![zip folder ubuntu zip folder ubuntu](https://static.javatpoint.com/installation/images/zip-and-unzip2.png)
To compress a file (or multiple files), execute the following command example.įirst, move into the folder that has the files you wish to compress. From there, make use of the tar command example below to learn how to compress files and folders. To compress files in a TarGZ archive, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. However, the most versatile and useful archives you can make with Tar is TarGZ. The Tar command can create archives in many different formats, such as TGZ, Tar, XZ, and others. Tar is a built-in utility that a lot of Linux programs rely on, so there is no need to go over how to install it. The number one way to compress files in the terminal on the Linux platform is with Tar. Are you new to Linux? Want to learn how to compress files from the Linux terminal but don’t know how to do it? We can help! Follow along as we go over 4 ways to compress files in the terminal on Linux!