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.

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.

How to import email from Evolution to Thunderbird on Linux

If you’ve used Evolution mail on your Linux PC and you’re considering switching to Thunderbird as it is much more straightforward to use, you’ll be happy to know that it is possible to migrate from Evolution to Thunderbird on Linux. In this guide, we’ll go over how to export your email from the Evolution email client and import it into the Thunderbird email client.

Note: you must have the latest Thunderbird email client installed on your Linux PC to follow this guide. For more information on how to get Thunderbird working on Linux, click here.

Save Evolution mailbox

It is possible to migrate from Evolution to Thunderbird on Linux. Unfortunately, there is no Evolution mail option in the Thunderbird import tool, and it doesn’t seem like the app will be added to the Thunderbird import wizard any time soon. As a result, the only way you will be able to import your mail from Evolution is by saving mailboxes as Mbox files.

To start the process, launch the Evolution email client and let it fetch your mail. You may need to click on every individual folder in the app, so it may take a bit. Once all email is loaded into Evolution, follow the step-by-step instructions down below to save your Evolution mailbox.

Step 1: Click on any folder in the Evolution app, and allow all of the messages to load. Then, press the Ctrl + A keyboard combination to select all of the mail in the folder. Use the scrollbar to confirm that absolutely every email, old and new, is selected. If all of the emails are not selected, press Ctrl + A once again.

Step 2: Right-click on any email message, ensuring that all of the emails are still selected. After right-clicking, a menu will appear on the screen. Look through the right-click menu for the option to “Save as mbox.”

Step 3: Once you choose the “Save as mbox” option, a pop-up window will appear on the screen. In this pop-up window, save the name of your mbox file. For best results, name it after the folder you’re saving.

So, for example, if you are saving an “archive” folder, save it as archive.mbox. An “inbox” folder? Try inbox.mbox. Just be sure that the mbox file has a proper name that allows you to identify it.

Step 4: Repeat steps 1-3 for each folder in Evolution, ensuring that you have all of your mail messages exported. The exporting process may take a bit of time, so be patient. When you finish saving all of your mbox files, move on to the next section of the guide!

Install Thunderbird import extension

Mozilla Thunderbird does not natively support Mbox files. However, you can quickly add this feature to the email client by installing ImportExportTools NG via the extensions store.

Note: your Thunderbird email configuration needs to be POP3 to import an Evolution email to it. The importing process is not possible with IMAP, as they are remote folders.

To install the extension, do the following. First,  launch Thunderbird. Then, click on the settings menu button on the right (next to the search box). Inside of the settings menu, look for the “Addons” menu and click on it with the mouse.

In the “Addons” menu, click on the “Addons” menu item inside. This menu item will take you to the Thunderbird extension manager. Inside of the extension manager, look for “Extensions” on the side and click on it.

After clicking on “Extensions,” locate the search box net to “Find more extensions,” and type in “ImportExportTools NG.” Press Enter to search. Then, look through the search results for “ImportExportTools NG.”

On the ImportExportTools NG page, click on the “Add to Thunderbird” button to add the extension to your email client. Then, restart Thunderbird to finish the setup process.

Importing to Thunderbird

To import your email exported from Evolution as a Mbox file, follow the step-by-step instructions below.

Step 1: Open up Thunderbird and select your email account in the app with the mouse. Then, right-click on the inbox folder to bring up the right-click menu.

Step 2: Look through the right-click menu, look for ImportExportTools NG in the menu, and select it with the mouse. Then, look for the “import mbox” option, and select it with the mouse to bring up the importing tool.

Step 3: In the import menu, locate “Import directly one or more mbox files” and click on the “OK” button to continue.

Step 4: Using the file manager pop-up window, browse for the exported Evolution mbox mail file on your PC. Then, select “Open” to import it.

Once the mbox file is added to the Thunderbird mail client, you will see your old exported email messages. Repeat steps 1-4 to add all of the mbox files if you have more than one file saved.

The post How to import email from Evolution to Thunderbird on Linux appeared first on AddictiveTips.

How to cut out an image on Linux

Do you have an image file that you want to cut out of a picture, so it looks good on a web page or other types of projects? Are you a Linux user and not great with basic image editing? We can help! Follow along with this guide as we go over how to cut out an image on Linux!

Installing Gimp on Linux

While it is true that there are a lot of great image editors on the Linux platform that can be used to take an image cut it out, we will be focusing on the Gimp app in this guide. As a result, we must go over how to get the latest release of the Gimp image editor up and running on Linux.

To install Gimp on Linux, launch a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, enter the commands below to get the app working.

Note: need help getting Gimp working, but want a more in-depth explanation of how to install the app? Check out our guide on how to get Gimp working on Linux. The instructions below are simply for convenience and aren’t as detailed as what is covered in the Gimp installation guide.

Ubuntu

sudo apt install gimp

Debian

sudo apt-get install gimp

Arch Linux

sudo pacman -S gimp

Fedora

sudo dnf install gimp

OpenSUSE

sudo zypper install gimp

With the Gimp application installed, launch it via the app menu on your Linux desktop. Then, move on to the next section of the guide.

Import image in GIMP

Now that the Gimp app is installed and open on the Linux desktop, you must import the image you wish to edit. There are two ways to import image files into the Gimp app on Linux. Here’s how to do it.

Method 1 – traditional importing

To import an image into the Gimp image editor the traditional way, follow the step-by-step instructions below.

Step 1: Find the “File” button in the Gimp window, and click on it to access the items.

Step 2: Locate the “Open” button in the “File” menu, and select it. Selecting “Open” will bring up a file browser.

Step 3: Use the file browser to locate the image file you would like to edit in the Gimp image editor.

After selecting “Open,” Gimp will load up the picture into the workspace.

Method 2 – drag-and-drop

To add an image via the “drag-and-drop” feature in Gimp, do the following.

Step 1: Launch the Linux file manager, and find the image you wish to cut out.

Step 2: Select the image in the Linux file manager, and drag it into the Gimp workspace. It should load into Gimp instantly.

Add alpha channel to the image

To cut out an image in Gimp, you must add an alpha channel. Without getting too technical, it allows for transparency effects, to be saved in the final image. Adding an alpha channel to an image in Gimp is relatively simple. To do it, follow the step-by-step instructions below.

Step 1: Locate the layers tool in Gimp on the right-hand side of the Gimp workspace window. If you cannot find the layer tool, it is directly under the brushes and the “mode” tool. You’ll see your image file-name, followed by an eye icon.

Step 2: Once you’ve found the layer area in Gimp, right-click on your image using the mouse. Look through the right-click menu for the “Add Alpha Channel,” and click on it to add an alpha channel to your image.

Cut out image

To most people, the concept of “cutting an image” means cutting a specific section of an image file out of the main picture, so that it can be placed onto other images, or used on web pages, etc. For example, if I want to “cut out,” Lisa Simpson, I need to cut the background around her in the picture.

To cut out your image, you will need to use the “free select tool.”

  1. Select the free select tool to access it. Upon selecting the “free select tool,” your mouse cursor will turn into a crosshair.
  2. Using the crosshair, slowly (and carefully) click around the thing you want to cut out. You will need to make a complete closed loop.

Unsure what “closed-loop” means? Just make sure that the selection you are making connects because if it does not connect, the free select tool will not make a selection.

  1. After you’ve selected the portion of the image you wish to cut out, press the Ctrl + I button on your keyboard. This keyboard combination will invert the selection so that you can quickly delete the background.

  1. Once you’ve pressed Ctrl + I to invert the selections, press the Delete button to erase everything in the image but the portion of the image you’ve selected with the “free select tool” to cut out the image.
  2. Save the final image in PNG format. Do not save it in JPG or JPEG or the background transparency will be lost.

The post How to cut out an image on Linux appeared first on AddictiveTips.

How to play Control Ultimate Edition on Linux

Control is an action-adventure game developed by Remedy Entertainment. It was released in 2019 for Xbox, PS4, and Microsoft Windows. In 2020, the “Ultimate Edition” was released, which adds new features to the experience.

In Control, the player plays as Jesse Faden, an employee at the fictional Federal Bureau of Control, a secret agency that investigates things that violate the laws of reality. Here’s how to get the game working on Linux.

Getting Control Ultimate Edition working

To enjoy Control Ultimate Edition on Linux, you will need to set up the Steam Linux client.

Install Steam

To set up the Steam Linux app, open up a terminal window and follow along with the command-line installation instructions that correspond with the Linux OS you currently use.

Ubuntu

On Ubuntu, the Steam app is in the “Ubuntu Universe” software repository. To install it, run the following Apt command.

sudo apt install steam

Debian

Debian Linux doesn’t distribute the Steam app by default. However, it is possible to turn on the “non-free” software repo to get it set up. That said, it’s much easier to download Steam for Debian from the Steam website. 

To download the Steam Debian package, use the following wget command. It should take a couple of seconds to complete.

wget https://steamcdn-a.akamaihd.net/client/installer/steam.deb

When the package is done downloading to your computer, you’ll be able to install it on the Debian system by making use of the dpkg command. 

sudo dpkg -i steam.deb

Arch Linux

Arch Linux has had the Steam app in their software sources for a very long time. As a result, it is very straightforward on Arch to get the app working. Using the pacman command below, install Steam.

sudo pacman -S steam

Fedora/OpenSUSE

If you’re using Fedora or OpenSUSE Linux, you should know that it is possible to install Steam on them. However, on Fedora, you need to add a third-party repo, and on OpenSUSE, it can be tedious. A much better idea is to follow the Flatpak instructions for Steam instead.

Flatpak

The official Linux Steam client is available as a Flatpak app in the Flathub app store. So, if you’re on a Linux distribution that doesn’t specifically support Steam, this installation method is the best way to go. 

Setting the official Steam client up on Linux through Flatpak starts by enabling the Flatpak runtime. To set up the Flatpak runtime, install the “flatpak” package via the terminal on your OS, or follow our in-depth guide on the subject. Then, use the flatpak remote-add command below to enable Flathub.

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Now that your Linux PC has access to Flathub, the installation of the official Steam app can begin. Using the flatpak install command below, install the latest Steam client.

flatpak install flathub com.valvesoftware.Steam

Play Control Ultimate Edition

Once the Steam app is set up on your app menu, browse for “Steam” and launch it. Then, log into your account and follow the step-by-step instructions outlined below to get Control Ultimate Edition working.

Step 1: Locate the “Steam” menu, and click on it with the mouse. Once inside the Steam menu, find “Settings” and click on it to load up Steam Settings. In the Steam Settings area, find “Steam Play” and check both “Enable Steam Play for supported titles” and “Enable Steam Play for all other titles.” 

After enabling Steam Play, click the “OK” button to apply the settings. 

Step 2: Now that Steam Play is enabled, find the “STORE” button, and select it with the mouse. On the Steam “STORE” page, look for the search box. Then, type “Control Ultimate Edition” in the box and press the Enter key to view search results.

Step 3: In the search results, locate “Control Ultimate Edition” and click on it to go to the Control Ultimate Edition storefront page. Then, click on the green “Add to cart” button to purchase the game.

Step 4: Once you’ve purchased Control, find the “LIBRARY” button, and select it to go to your Steam library. Then, find “Control Ultimate Edition,” and select it to access it’s Steam Library page.

On Control’s Steam Library page, find the blue “INSTALL” button, and select it to begin downloading and installing Control Ultimate Edition on Linux. 

Step 5: After Control Ultimate edition is done downloading, the blue “INSTALL” button will become a green “PLAY” button. Click on it to start playing the game!

Troubleshooting Control Ultimate Edition

Control Ultimate Edition runs on Linux as if it were a native title, so there’s no reason to troubleshoot the game. That said, if for some reason you do run into issues, be sure to check out the Control Ultimate Edition ProtonDB page

The post How to play Control Ultimate Edition on Linux appeared first on AddictiveTips.