One of the best ways to protect your files on a Linux system is to enable hard disk encryption. It's possible to encrypt an entire hard drive or partition, which will keep every file that resides there safe. Without the correct decryption key, prying eyes will only be able to see cryptic gibberish when they try to read your files.

In this guide, we'll go over the step by step instructions of using LUKS to encrypt a Linux partition. Regardless of what Linux distro you're running, these steps should work the same. Follow along with us below to get partition encryption configured on your own system.

In this tutorial you will learn:
  • How to install cryptsetup on major Linux distros
  • How to create an encrypted partition
  • How to mount or unmount encrypted partition
  • How to setup disk encryption during Linux install
How to configure, mount, and access encrypted partition on Linux
How to configure, mount, and access encrypted partition on Linux

It may be necessary to configure IP forwarding on a Linux system in certain scenarios. If the Linux server is acting as a firewall, router, or NAT device, it will need to be capable of forwarding packets that are meant for other destinations (other than itself).

Conversely, IP forwarding should usually be turned off if you're not using one of the aforementioned configurations. You typically don't want your system wasting bandwidth or resources to forward packets elsewhere, unless it's been designed to do that job.

In this guide, we'll go through the step by step instructions to enable or disable IP forwarding through command line examples. You can apply these commands to any major Linux distro, including popular choices like Ubuntu and Red Hat.

In this tutorial you will learn:
  • How to check the current IP forwarding status
  • How to enable or disable IP forwarding
  • Common troubleshooting steps for IP forwarding
Checking the status of IP forwarding and enabling the setting
Checking the status of IP forwarding and enabling the setting

Squid is a robust proxy server that supports caching for protocols like HTTP, HTTPS, and FTP. It has the ability to speed up web requests by caching frequently accessed websites, and serving that cache to requesting clients. This is a great way for networks to reduce bandwidth consumption and provide snappier response times for web browsing.

In this guide, we'll go over the step by step instructions to download, install, and configure Squid proxy on a Linux system. Follow along with us to get it setup on your own system, which can either provide caching just for yourself or all the way up to an entire organization of computers.

In this tutorial you will learn:
  • How to download and install Squid proxy on major Linux distros
  • How to configure Squid proxy
  • How to configure a browser to use Squid proxy

For anyone looking to protect their privacy online, Tor is an invaluable tool. It is both one of the most reliable ways to hide your identity and one of the easiest to use on Linux.

Tor works by routing your computer's internet traffic through their own network. This way, you can still access online resources as usual, but your network traffic appears to originate from the Tor network, your IP address remains hidden, and your data is encrypted in the process. With Tor, you can also access .onion domain names, and access the infamous dark web.

In this guide, we'll show you how to download, install, and configure Tor on a Linux system. This will get you up and running in a few steps so you can anonymize your traffic and access Tor-specific websites.

In this tutorial you will learn:
  • How to download and install Tor on Linux
  • How to configure Tor
  • How to keep Tor up to date
  • How to install new addons in Tor, and should I?

Syncthing is defined as a continuous file synchronization program: it can be used to keep files and directories synchronized across different devices or “nodes”. The application uses TLS as encryption method, and it is, together with its protocol, free and open source software. When using Syncthing, our data remains on our device, and is transferred directly to the destination without relaying on a central server (peer to peer). In this tutorial we will see how to install, configure and use Syncthing on Linux.

In this tutorial you will learn:

  • How to install Syncthing on the most used Linux distributions
  • How to setup the firewall for Syncthing to work correctly
  • How to share and keep a directory synchronized across two devices
  • How to austostart the Syncthing daemon automatically on user login

RAID stands for Redundant Array of Inexpensive Disks; depending on the RAID level we setup, we can achieve data replication and/or data distribution. A RAID setup can be achieved via dedicated hardware or via software. In this tutorial we see how to implement a RAID1 (mirror) via software on Linux, using the mdadm utility.

In this tutorial you will learn:

  • The peculiarities of the most used RAID levels
  • How to install mdadm on the major Linux distributions
  • How to configure a RAID1 with two disks
  • How to replace a disk in the RAID array

Gnu Privacy Guard (gpg) is the Gnu project free and open source implementation of the OpenGPG standard. The gpg encryption system is called “asymmetric” and it is based on public key encryption: we encrypt a document with the public key of a recipient which will be the only one able to decrypt it, since it owns the private key associated with it. Gpg allows us also to sign documents using our private key and let others verify such signature with our public key. In this tutorial we will see how to generate and create a backup of a gpg keypair.

In this tutorial you will learn:

  • How to install gpg
  • How to generate a gpg keypair
  • How to list our keys
  • How to create a backup/export a gpg keypair and trustdb

Renaming files on Linux systems is usually handled by the mv (move) command. The syntax is just mv old.txt new.txt. Simple enough, but what if we have multiple files that need to be renamed at once, even hundreds of them? The default mv utility can't handle renaming more than one file unless we do a bit of scripting. There are also other utilities we can install to solve the problem, like rename and mmv.

In this guide, we'll show you how to use the mv command as well as the rename and mmv tools to rename multiple files on your Linux distro. We'll go over several examples so you can understand the syntax and how to use each method.

In this tutorial you will learn:
  • How to rename multiple files at once with mv command
  • How to install rename on major Linux distros
  • How to install mmv on major Linux distros
  • How to use mmv, through command examples
  • How to use rename, through command examples

One of the most attractive features of running a Linux system is the instant access to thousands of packages that are able to be installed from the Linux distro's package manager.

The apt package manager does a lot more than just install packages. One example is using apt to search for packages to install. In this guide, we'll see how to list installed packages with apt. This will only work in Linux distros that use the apt package manager, such as Debian, Ubuntu, and Linux Mint just to name a few.

In this tutorial you will learn:
  • How to list installed packages with apt package manager

Debian Linux and other Debian based Linux distributions, such as Ubuntu and Linux Mint, use dpkg as a package manager.

You might be thinking, "I thought those distributions used apt - that's what I always use to install packages." That's true, apt is also a package manager, but really it's just passing off tasks to dpkg in the background. apt and other package managers on Debian usually just utilize dpkg to install packages or perform similar tasks.

Package manager commands like those from apt or apt-get are meant for end-users. They're easy to use and are very familiar to most Linux users. dpkg is low-level tool that is more geared towards use by the system, but we can still use it with the dpkg command.

In this guide, we'll go over various dpkg command examples to help you learn to use the tool and manage packages on your Debian or Debian based system.

In this tutorial you will learn:
  • How to install .deb packages with dpkg
  • How to use dpkg command through examples

The nano editor is one of the most popular ways to edit files via the command line on Linux systems. There are plenty of others, like vim and emacs, but nano is praised for its ease of use.

Despite being one of the easier to use text editors, it can still be confusing the first time you open it, especially if you're used to GUI applications. In this guide, we'll go over the step by step instructions to save and exit a file in nano. This is one of the most common and recurring tasks you'll ever do with the text editor.

In this tutorial you will learn:
  • How to save and exit a file in nano editor

The tar file type is used to combine multiple files into a single archive. Tar actually means "tape archive," because tar's original purpose was to be used on tape backups - that should tell you how old this format is. Linux systems still use the tar format, and it continues to enjoy widespread use to this day.

Tar files, with the extension .tar, are often called "tarballs." These files will preserve the Linux file permissions and can combine any number of files into the single archive, but they don't apply any compression or space savings. However, compression can be easily applied to the tar file, resulting in extensions like .tar.gz in the case of gzip compression, or .tar.xz for xz compression.

In this guide, we'll show how to open tar files on command line and via GUI. This will include tar files with various compression applied to the archive. Check out the examples below to find out how.

In this tutorial you will learn:
  • How to open tar file via GUI
  • How to open tar file via command line

Truncating files on a Linux system is a rather basic and common task for users and administrators alike. Perhaps the most common use for truncating (or emptying) a file would be in the case of log files. Clearing a bunch of old data from log files to make way for newer and up to date information can make troubleshooting much easier.

In this tutorial, we'll show several ways to truncate a file on the Linux command line, including multiple files at once. Use the methods below on your own system, applying the example you feel will best fit your scenario.

NOTE
You can only truncate files if you have the proper Linux file permissions. Specifically, you must have write permissions on whichever files you're trying to truncate.
In this tutorial you will learn:
  • How to use the truncate command
  • How to empty a file with Bash shell operator >

The lsof Linux command is used to list open files. On Linux systems, everything is considered a file. This means that files, directories, sockets, pipes, devices, etc are all files, therefore the lsof command will list all of these things if any of them are in use.

Along with showing you what files are in use, it will give you detailed information about which user and process is using the file. As you can imagine, this can be pretty handy in a multitude of scenarios, such as when trying to figure out what connections are being made to your system or what processes are tying up a disk that you're trying to unmount, etc.

In this guide, we'll show you some of the most helpful examples of the lsof command to help you get the most out of it on your own system.

In this tutorial you will learn:
  • How to use the lsof command with examples

RAID 1 is a hard disk configuration where the contents from one hard disk are mirrored onto another. This provides the user with some redundancy in case a disk fails. On your Linux system, the two hard drives are represented as a single file system. But in the background, making changes to your files is actually writing the changes to two disks at the same time. You can also add more than two disks to the configuration, as long as you keep the number even. Otherwise, something like RAID 5 will be more suitable.

There are many ways to configure a RAID setup. One of the easiest and most accessible ways is through the mdadm software package, which can be installed and used on any major Linux distribution. This is easier than some other RAID setups, since it doesn't require any special hardware (like a RAID controller) and isn't that hard to configure.

In this guide, we'll go through the step by step instructions to install and setup mdadm on Linux, and create a RAID 1 configuration for two hard disks. Our example scenario will consist of two empty hard disks that are each 10 GB in size. This is in addition to our main hard disk, which is just used for the operating system.

WARNING
Strictly speaking, RAID 1 is not a proper backup solution. It does provide some protection from disk failure, but what if you accidentally delete a file or a virus corrupts multiple files? Those undesirable changes are instantly written to both disks. RAID 1 provides high availability, but you shouldn't use it as your only backup solution.
In this tutorial you will learn:
  • How to install mdadm on major Linux distros
  • How to partition hard disks for RAID setup
  • How to create a new RAID device in mdadm and mount it
  • How to keep the RAID array mount persistent
Using mdadm to create a software RAID 1 array on Linux
Using mdadm to create a software RAID 1 array on Linux

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: