4 ways to compress files in the terminal on Linux

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!

1. Tar

The number one way to compress files in the terminal on the Linux platform is with Tar. 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 Tar command can create archives in many different formats, such as TGZ, Tar, XZ, and others. However, the most versatile and useful archives you can make with Tar is TarGZ. 

To compress files in a TarGZ archive, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. From there, make use of the tar command example below to learn how to compress files and folders.

To compress a file (or multiple files), execute the following command example. 

First, move into the folder that has the files you wish to compress. In this example, we will be using the “Documents” directory.

cd ~/Documents

Once the terminal is in the “Documents” directory, you create a new TarGZ archive. The command below will compress absolutely everything in the “Documents” folder.

tar -czvf my-new-archive.tar.gz *

Don’t want to compress everything in a folder? Only want to compress a specific thing? Try this command instead.

tar -czvf my-new-archive.tar.gz /home/username/path/to/file/or/folder/

Suffice it to say; the Tar command is incredibly versatile. We’ve just scratched the surface of what you can do to compress files. However, you can learn more about how to use Tar to create archives, execute the –help command below.

tar --help

2. Rar

Another way to compress files on Linux via the terminal is with Rar. Rar is a free utility that allows those who install it to interact with the RAR archive format. 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.

To compress files in with the Rar utility in Linux, you must first install the program. The reason that this program must be installed is that Unrar supports a proprietary format, and many Linux distributions don’t like that fact. 

Ubuntu

sudo apt install rar

Debian

sudo apt-get install rar

Arch Linux

sudo pacman -S rar

Fedora

sudo dnf install https://forensics.cert.org/fedora/cert/32/x86_64/rar-5.4.0-1.fc32.x86_64.rpm

OpenSUSE

sudo zypper addrepo http://packman.inode.at/suse/openSUSE_Leap_15.2/ packman-x86_64

sudo zypper install rar

Once the Unrar app is set up on your Linux PC, you can use the unrar command to compress files. Using the command examples below, create a Rar archive. Be sure to customize the commands to suit your needs.

rar a -r my-rar-archive.rar /home/username/path/to/folder/

Or, to compress a single file, execute the following command.

rar a my-rar-archive.rar /home/username/path/to/file.file

Lastly, you can compress all files in a folder.

cd /home/username/folder/where/files/are/

rar a my-rar-archive.rar *

When the Rar compression command finishes running, a RAR format archive will appear in the directory you ran the compression command.

3. Zip

If you need to compress files on your Linux PC that are also easily accessible on other operating systems (like Mac or Windows), Zip is what you want. It’s a universal compression format supported by all of the major operating systems. Here’s how to compress files with it on Linux.

First, open up a terminal window. Once the terminal window is open, follow the command-line examples below to learn how to compress files with the zip command.

To compress a folder containing files with the Zip tool, specify the location of the folder to the zip command. Keep in mind that you will need to customize the command example below to suit your needs.

zip -r name-of-zip-archive /home/username/location/of/folder/

Want to compress just a few files using the Zip tool, and not an entire directory? Try this command example out instead.

First, move into the directory where the files are you wish to compress.

cd /home/username/location/of/files/to/compress/

Then, compress the files using the zip command.

zip name-of-zip-archive filename1 filename2 filename 3

Or, compress every file in the folder using the wildcard (*).

zip name-of-zip-archive *

When the zip command completes, you will have a Zip archive in the directory in which you ran zip from.

4. Pigz

Pigz is a compression utility that is unlike any of the other programs on this list. See, other apps like Tar, Rar, and Zip can compress multiple files and folders. Not Pigz can only compress a file at a time, but it is good at it.

The thing about Pigz is that it allows users to quickly, efficiently compress a file to send to a friend or to back up. Pigz is very simple. To get started with it, launch a terminal window. Then, follow the instructions below to install it on your system.

Note: want to learn more about the Pigz compression tool? If so, check out our in-depth guide on how to use the Pigz tool on Linux!

Ubuntu

sudo apt install pigz

Debian

sudo apt-get install pigz

Arch Linux

sudo pacman -S pigz

Fedora

sudo dnf install pigz

OpenSUSE

sudo zypper install pigz

Now that Pigz is set up move into the directory with the file you wish to compress with Pigz using the CD command. Remember to change the example command below to suit your needs before running!

cd /home/username/folder/with/file/to/compress/

Once in the directory, compress the file using the pigz command.

pigz file.filename

When the command finishes, the compression process is done. You’ll find your file replaced with a compressed GZ archive in the folder you ran the command from.

Conclusion

There are many ways to compress files on Linux in the terminal; however, many beginner Linux users are not aware of these tools. If you’ve just started using Linux and wanted to find out different ways of compressing files, hopefully, this list pointed you in the right direction!

What is your favorite tool to use to compress files on Linux? Tell us in the comment section below!

The post 4 ways to compress files in the terminal on Linux appeared first on AddictiveTips.

Is Magic Mike on Netflix? How to Watch Magic Mike from Anywhere

Back in 2012, a new comedy/drama film appeared, and it made an impressive box office by drawing in mostly female viewers. We are talking, of course, of Magic Mike, and we are super glad we get to watch it online on Netflix.

Magic Mike was directed by Steven Soderbergh and its features Channing Tatum, Alex Pettyfer, Matt Bomer, Joe Manganiello, and Matthew McConaughey.

The film revolves around Mike, played by Channing Tatum, who makes money by stripping at a club owned by Dallas, who is played by Matthew McConaughey. His dream, however, is to open a custom furniture business. In the meantime, however, we get to enjoy impressive dance performances and a lot of six packs.

Is Magic Mike on Netflix?

Magic Mike can be found on Netflix if you know where to look. In fact, we managed to find the film is available to watch on Netflix in the United Kingdom or Canada, but it’s currently missing in the United States. It doesn’t mean, however, there is not going to get there sometime soon, but right now, you can’t watch it in the United States.

Similar to the United States are many other countries where the film is not available. For the most part, as long as you have an internet connection and an active Netflix subscription, you’re going to be able to enjoy the film and many others.

Netflix has different libraries in each country that it is available in, so if you live in an area where you do not get to watch the movie, there are ways around the problem.

 

How can I watch Magic Mike on Netflix anywhere?

Even though your local Netflix may not feature Magic Mike right now you can still enjoy the film. What you will need to have is extra is a trusted VPN.

VPNs can route your internet connection through their own servers and assign a new IP address to your account, which will make it appear as if you are in that specific country rather than your actual location.

ExpressVPN is one of the tools we love because it features thousands of servers that you can use at a moment’s notice. It also makes use of great encryption protocols so you can also enjoy some privacy online.

Here’s how you can use ExpressVPN to watch Magic Mike:

  • You’ll need to subscribe to ExpressVPN. Grab a deal that gets you 3 months for free right now!
  • Then you need to get to the apps for your device and find the server that in the United Kingdom or Canada so you can connect to it.
  • Once the connection is established, you can go ahead and launch Netflix in your browser or relaunch the app on your device.
  • Search for Magic Mike and enjoy the show.

See? It’s really that easy.

Doesn’t Netflix know you’re using a VPN?

Netflix does have the technology to detect when people are using certain IP addresses that they know come from VPNs but they don’t always know about all of them and premium tools are less likely to be detected.

If you do happen to have any such issues when you’re using ExpressVPN, you simply have to contact their Customer Support team. They will be more than happy to direct you towards a server that works with Netflix so you can watch the movie you are interested in. Since the team is available 24/7 it doesn’t really matter where you are and what time zone you’re on.

Can’t I use a free VPN instead?

Free VPNs are certainly something that we all want to use because they are free and they should technically get you to enjoy all the content you want. However, things aren’t really like that because free VPNs are often dangerous or useless.

First, we’re going to discuss about the VPNs that are dangerous because we’ve had numerous cases over the years when security researchers discovered malware underneath all the code in various so-called VPNs in app stores. Unfortunately, the malware would collect your personal information, including login details for your email account or your social media or even your banking platform. What this can lead to is identity theft, data breaches for your employer, financial fraud, and so on.

Editor’s note: ExpressVPN is our #1 choice for unblocking Netflix. Sign up for a year with ExpressVPN at $6.67 per month and get 3 months FREE. A 30-day money-back guarantee is included on all plans, so you can cancel any time and get your money back.

There are also tools that are pretty much useless for our goal here. The problem with free VPNs is that they rarely go undetected by platforms like Netflix. Even if they could bypass the blockade, you would still have trouble because free VPNs have few servers but lots of users. Unfortunately, this means that your internet speeds will drop considerably, and it would be nearly impossible to actually stream any type of quality video online.

There are also tools that are offered for free in exchange for you, allowing them to use your device as a sort of server for other app users. This can have a big impact on your device’s performance, which, again, is not ideal. Furthermore, these tools also continue working even after you stopped using the VPN, so your computer will not properly work for a longer time. Ultimately, while we do perfectly understand the attraction of free VPNs, we don’t think that you should go for them because the risks are too high.

Final thoughts

Using ExpressVPN to watch Magic Mike will make your life so much easier because you’ll get to enjoy everything Netflix has to offer from any country you are interested in accessing.

The post Is Magic Mike on Netflix? How to Watch Magic Mike from Anywhere appeared first on AddictiveTips.

How to Flash multiple USB sticks on Linux

Popsicle is a small Linux app created by the people behind Pop_OS. It’s a USB flashing tool that allows users to flash ISO images to multiple devices at once. In this guide, we’ll show you how to do just that.

Before we begin

Before we begin, ensure that you have multiple USB flash drives available with a capacity of at least 2 GBs in size ready to use. Make sure these drives are fast, as faster is always better when flashing ISO images over USB.

Installing Popsicle on Linux

The Popsicle application is not available for installation through traditional means (DEB, RPM, etc.), but that is OK. Popsicle is written in Rust, which makes it very, very easy to build from source. To start the building process, open up a terminal window, and follow the installation instructions outlined below.

Ubuntu

System76 develops Popsicle for its Pop_OS distribution. Pop_OS is based on Ubuntu, so getting Popsicle compiled on straight Ubuntu is super simple. You’ll only need to install the “git,” “cargo,” and “libgtk-3-dev” packages.

sudo apt install git cargo libgtk-3-dev

Debian

Debian and Ubuntu are very much the same when it comes to packages (minus a few exceptions). As a result, building Popsicle on Debian requires the same three packages that Ubuntu does (git, cargo, and libgtk-3-dev).

sudo apt-get install git cargo libgtk-3-dev

Arch Linux

There’s an Arch Linux package for Popsicle on the AUR. To install it, enter the following commands below. It will download the source code and take care of all dependencies automatically.

sudo pacman -S git base-devel

git clone https://aur.archlinux.org/trizen.git

cd trizen

trizen -S popsicle-git

Fedora

On the GitHub page for Popsicle, there is no mention of supporting RPM distributions such as Fedora. However, it is possible to get the app working, as long as you install the “git,” “cargo,” and “gtk3-devel” packages.

sudo dnf install git cargo gtk3-devel

OpenSUSE

Much like Fedora, OpenSUSE has no specific directions for installing Popsicle, and the developers don’t point to the fact that it works on it. That said, if you install the required build dependencies, it should work just fine.

sudo zypper install git cargo gtk3-devel

Setting up Cargo

After setting up the dependency packages required to build Cargo, the next step is to install the Cargo-vendor package. The vendor package can only be set up through Cargo, and without it, Popsicle will have a hard time installing on Linux.

To install the Cargo-vendor package on your Linux PC, run the following cargo install command in a terminal window. Do not run the command with sudo!

cargo install cargo-vendor

Setting up the Cargo-vendor package may take a couple of minutes, so sit back and be patient. When the process is complete, move on to the next section of the guide.

Set up Popsicle

Thanks to the Cargo tool, building and installing Popsicle is pretty hands-off. You don’t need to mess with configurations, manually set up a make file, or any of that. Instead, to build the program, download the code with git, enter the directory with CD, and build the code with make.

git clone https://github.com/pop-os/popsicle.git
cd popsicle

make gtk

Once the code is built, install Popsicle on your Linux PC using the sudo make install command.

sudo make install gtk

Using Popsicle 

To use Popsicle, start by launching the program on the Linux desktop by searching for “USB Flasher” in the app menu. Or, open up a terminal window and run popsicle-gtk to start it up.

Once the Popsicle application is open on your computer, follow the step-by-step instructions outlined below to flash multiple USB devices.

Step 1: Plug in all of your USB flash drives into USB ports on your Linux PC. Ensure that these devices are on USB 3.0 for fast speeds.

Step 2: In Popsicle, you will see “Choose an Image.” Look for the “Choose Image” button, and click on it with the mouse. Upon clicking on the “Choose Image” button, a pop-up window will appear.

In the pop-up window that appears, browse for the ISO image you wish to burn to USB. Popsicle also supports IMG files if you prefer to use that format instead of ISO.

Step 3: After selecting the ISO image you wish to flash using Popsicle, look for the “Next” button in the top-right corner and click on it with the mouse to move to the next page.

Step 4: In the “Select Drives” window, Popsicle will show all USB devices connected to your Linux PC. Find the “Select all” button to select all of them, so that Popsicle can use it to flash the ISO image to all devices. 

Click the “Next” button in the top-right corner to move on to the next page.

Step 5: Once you’ve selected all USB devices in Popsicle, the app will ask you to enter your system password. Do so, and click “Authenticate.” Upon logging in with your password, Popsicle will begin to flash the ISO to your USB devices. Be patient; this could take a while.

When Popsicle is done flashing your USB devices, close the app. Your USB devices are ready to use!

The post How to Flash multiple USB sticks on Linux appeared first on AddictiveTips.

120Hz TVs and Phones Are Here: Do You Need It?

Consumer electronics such as TVs and phones are often marketed with new technology buzzwords that are easy to stick on the outside of the box. Which is why you see icons with terms like “4K”, “HDR” and other technology soundbites emblazoned on the marketing materials. 

Now “120Hz” has joined the list of marketable features for both of these product types. What does this mean? A “120Hz TV” refers to the “refresh rate” of the TV screen, which needs just a little explanation.

What Does “Refresh Rate” Mean?

The refresh rate describes how often your screen can completely update the image it’s displaying. So a 120Hz TV screen can display 120 unique fresh images every second! It’s a simple concept, but it has a significant impact on what the image looks like.

Refresh rate is related to the “frame rate” of the content you’re viewing. That is, how many unique still frames for every second of the video’s duration. The more frames there are each second, the smoother the motion will appear. If the content has a frame rate higher than the refresh rate of the screen, then you’ll see no benefit from the extra motion detail.

Refresh Rate Vs. Resolution

You’re probably already familiar with the concept of “resolution” when it comes to modern screens. This is the number of “pixels” that make up the picture. The higher the resolution, the finer the detail in the image. This assumes you’re displaying an image that contains enough detail to match what the screen is capable of displaying!

The refresh rate is somewhat like resolution. In fact, it’s sometimes referred to as “temporal” resolution. It’s the amount of motion detail that can be displayed over time, as opposed to the total amount of detail that can be shown in a single frame.

120Hz displays do not have to be a particular resolution. For 120Hz TVs, most units are going to offer a 4K image resolution, but you might find examples that offer that refresh rate at lower resolutions. So remember to assess these two features separately. 

It’s also important to ensure that the connection options on your TV support 120Hz at the resolution you desire. A TV with an HDMI 2.1 connector is capable of 120Hz at 4K resolutions. Anything lower than this does not officially support this resolution and refresh rate combination.

Why 120Hz Matters for TVs

Just about every TV in homes and on shelves today supports a minimum of 60Hz. Right now, you won’t find any video content on platforms like YouTube that runs at a higher refresh rate. For cinematic content, 24 frames per second is the norm, with the occasional experiment at higher rates, such as the Hobbit films which were offered at 48 frames per second. Much of television content is at 30 frames per second. So, as you can see, there’s little if anything to watch above 60Hz.

Things are very different when we switch to computers or gaming consoles. The latest generation of gaming consoles are capable of outputting frame rates at 120Hz, depending on the title. So in titles that can run at those speeds, you’ll experience incredible smoothness and responsiveness.

Why 120Hz Matters for Phones and Tablets

While the case for 120Hz on a TV is all about ultimate fluidity, there’s an added dimension on phones and tablets. That’s because on a smartphone the screen is not only something you look at. It’s a tactile interface. 

A 120Hz screen’s fluidity improves the feel of using a touch interface. Usually the touch detection on such phones is also set to sample your touch input at 120Hz, which makes the phone feel snappy and intuitive to use. Many people who have used 120Hz smartphones feel that 60Hz interfaces now feel sluggish, regardless of how fast the internal processors are.

120Hz phones do have trade offs however. Usually the phone has to run at a slightly lower resolution than its screen is capable of, resulting in a slightly less sharp image. 120Hz phones are also more power hungry, though they do offer power saving options, such as lowering the refresh rate in battery saving mode.

Other Display Features to Consider

The refresh rate of a screen is just one component that affects overall image quality. As we mentioned before, in some cases 120Hz mode requires dropping your image resolution. A 120Hz TV that lacks features such as HDR or good black levels may be a worse overall choice than a 60Hz model that does have these features.

So you should never let a single marketing number such as “120Hz” sway you one way or another. Rather, look at the device holistically and consider it in relation to the content you’re actually going to consume and the use cases you have for it.

Be Aware of “Fake” 120Hz TVs!

Many TVs list an “effective” rate of 120Hz or some other high refresh rate. However, what these TVs actually do is use a technique such as black frame insertion or frame interpolation to make motion look smoother.

However, you aren’t actually seeing more than 60 frames of video per second, since the fake frames don’t contain new information. Always look for a native 120Hz (or higher) refresh rate if you want the real deal!

Is 120Hz For You?

Here we get to the bottom line. Should you upgrade your current TV or phone to one with a 120Hz display?

On the TV side of the equation, the only people who should really consider the jump to 120Hz in the short term are gamers. The new PlayStation 5 and Xbox Series S and X consoles can offer gaming content at up to 120 frames per second. This is a significant upgrade. If you have a powerful gaming PC, there are monitors that support up to 240Hz as a graphics card can output at a frame rate higher than 120.

If you’re thinking about getting one of these new consoles, it’s worth purchasing a 120Hz TV with 4K capability. For other content types, there’s no rush at all. In fact, most people don’t like the look of high frame rate video when it comes to movies and TV shows.

When it comes to 120Hz phones, games also get a nice improvement. Assuming the phone in question can run the game at those speeds. However, the true value of 120Hz comes in the tactile user experience. 120Hz mobile devices feel dramatically more snappy and reactive. It’s a usability revolution that just about anyone will appreciate. While it’s not a reason to immediately dump your current smartphone, most people buy phones on a much shorter replacement cycle than televisions. 

Our recommendation for when that time comes is to look for a handset that offers 120Hz input and display. The subjective improvement in responsiveness and feel is so dramatic, that we’re comfortable in saying that a 120Hz display should be a minimum for phones and tablets moving forward.