General

Compress A File With WinRAR

Today’s article is going to teach you how to compress a file with WinRAR. This isn’t exactly something you’re going to do often, unless you share files with Windows users. If you do share files with Windows users, this isn’t such a terrible idea. There are worse ideas, some of which are on this site.

Before you get to excited, there are countless ways to compress a file in Linux. The odds of  you technically needing WinRAR are about zero. Still, that doesn’t mean we can’t have fun and learn new things!

Right?

Right!

It’s great to learn new things, even if you’re never gonna use them. Until about 5 minutes ago, I can’t remember the last time I felt the urge to compress a file with WinRAR. I’ve previously written about WinRAR, actually. 

How To: Extract An .rar File

So, if you follow that link you’ll learn how to perform the other end of this operation! I’d like to pretend I planned it that way, but I did not. No, there’s no rhyme or reason to the publication schedule – except you get a new article every other day.

Compress A File With WinRAR:

Yup. You’re gonna need an open terminal for this one. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

First, you’re going to need rar. It’s probably in your default repositories. It’s there for Debian, Ubuntu, and Mint. So, it’s probably available for you. You can get the proprietary version of WinRAR here. (Or not… I don’t see a whole lot of folks wanting that, but it’s there if you do! Also, I think it’s just a trial version.) Or, install it from your repositories. With those operating systems, it’s just:

sudo apt install rar

Now, it’s really easy to compress a file with WinRAR. The command is:

rar a <compressed_file_name>.rar <file_or_folder_name>

The ‘a’ flag is telling the command to archive the file/folder you named. If you wanted to compress a file (or even a directory) named foo, it’d look like this:

rar a foo.rar foo

See? That’s all you really needed to know if you want to compress a file with WinRAR. It’s not exactly complicated, but it’s helpful to know how if you come across a situation where you actually need to know. Again, there’s a zillion ways to compress files in Linux, so you’re not going to need this one all that often unless you really need it. If you do use WinRAR with Linux often, please leave a comment explaining why.

Closure:

Yup. It’s another article! This one teaches you how to compress a file with WinRAR. In my defense, this is information that’s from my notes. I have a whole lot of notes, but this one stood out today and so you get this for your article. You’re welcome!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

17 hours ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

3 days ago

Demystifying journalctl: A Comprehensive Guide to Linux System Logging

It was suggested that I write an article about journalctl, which seemed like a large…

5 days ago

Extract Text From Multiple File Types

Today we will have a fairly simple exercise as we're going to just use a…

7 days ago

Meta: I’ve Been At This For Three Years!

I have not done a meta article lately. I don't find them interesting to write…

1 week ago

How To: Disable CPU Cores

This is not something everyone is interested in doing but you might as well learn…

2 weeks ago