How to delete a directory on Linux

How to delete directory on Linux

Deleting a directory (also called folder) on Linux is a common task that every user will have to perform at some time or another. This can be done via any desktop environment that you have installed, or from command line with the rm command.

While this is a pretty basic function, there are some important caveats to keep in mind. In this guide, we’ll go over several examples of deleting a directory on Linux. Feel free to follow along on your own system in order to master the rm command and GUI process.

In this tutorial you will learn:

  • How to delete a directory via GUI
  • How to delete a directory via command line
How to delete a directory on Linux

How to delete a directory on Linux

Read more

Bash Change Directory (cd) Methods, Tips and Tricks

Bash Change Directory (cd) Methods, Tips and Tricks

Changing directories in a terminal may have become a thing of the past for mainstream users. However, if you do any level of system administration work, testing work, Big Data Manipulation or similar, you will soon find yourself using the Change Directory (cd) command at the Bash or Linux terminal prompt more and more.

In this tutorial you will learn:

  • Simple terminal Change Directory (cd) command usage
  • Additional methods, tips and tricks for making a richer cd experience
  • Examples highlighting the use of the various cd commands
Bash Change Directory (cd) Methods, Tips and Tricks

Bash Change Directory (cd) Methods, Tips and Tricks

Read more

How to install Debian on an existing LUKS container

How to install Debian on an existing LUKS container

LUKS (Linux Unified Key Setup) is the de-facto standard encryption method used on Linux-based systems. While the Debian installer is perfectly capable of creating a LUKS container, it lacks the ability to recognize and therefore re-use an already existing one. In this article we see how we can workaround this problem using the “DVD1” installer, and running it in “advanced” mode.

In this tutorial you will learn:

  • How to install Debian in “advanced-mode”
  • How to load the installer additional modules needed to unlock an existing LUKS device
  • How to perform the installation on an existing LUKS container
  • How to add an entry in the crypttab file of the newly installed system and regenerate its initramfs

Read more

How to check disk space with df and du on Linux

How to check disk space with df and du on Linux

Df and du are two very useful utilities which are normally installed by default in all Linux distributions. We can use the first one to obtain an overview of the used and available space on mounted filesystems; the second, instead, is very useful to obtain a detailed report about the space used by files and directories. In this article we take a look at their usage, and we see what are the most common used options which can be used to modify their behavior.

In this tutorial you will learn:

  • How the df utility works
  • How to show the output of df in human-readable form
  • How to include the filesystem type in the output of df
  • How to include or exclude filesystems from the output of df
  • How the du utility works
  • How to obtain a human-friendly output with du
  • How to obtain a summary of the used space
  • How to exclude files from the output of du
  • How to obtain a “grand total” of the space in use by multiple directories

Read more

LFTP tutorial on Linux with examples

LFTP tutorial on Linux with examples

There is certainly no shortage of ftp client on Linux: some come with a graphical user interface such as Filezilla, others are command line applications which can be used even when display servers, such as Xorg or Wayland are not available. In this article we talk about one of the most used and feature-rich CLI ftp client: lftp.

In this tutorial you will learn:

  • How to install lftp on the most used Linux distributions
  • How to connect and authenticate to a remote host
  • How to create, remove, edit and list bookmarks
  • Some of the most used lftp commands
  • How to run commands non-interactively
  • How to download torrent files with lftp

Read more

Cracking a password protected zip file on Kali Linux

How to crack zip password on Kali Linux

The objective of this guide is to show how to crack a password for a zip file on Kali Linux.

By default, Kali includes the tools to crack passwords for these compressed archives, namely the fcrackzip utility, John the Ripper and a word list. Follow along with us in the step by step instructions below as we show two different methods for cracking the password of a zip file.

In this tutorial you will learn:

  • What tools are used to crack password protected zip files?
  • How to crack zip password with John the Ripper
  • How to crack zip password with fcrackzip
Cracking a password protected zip file on Kali Linux

Cracking a password protected zip file on Kali Linux

Read more

Using WPScan on Kali Linux

Use WPScan to scan WordPress for vulnerabilities on Kali

Vulnerabilities in WordPress can be uncovered by the WPScan utility, which comes installed by default in Kali Linux. It’s also a great tool for gathering general reconnaissance information about a website that’s running WordPress.

Owners of WordPress sites would be wise to try running WPScan against their site, as it may reveal security issues that need patched. It can also reveal more general web server issues, such as directory listings that haven’t been turned off inside Apache or NGINX.

WPScan itself is not a tool that can be used maliciously while performing simple scans against a site, unless you consider the extra traffic itself to be malicious. But the information it reveals about a site can be leveraged by attackers to launch an attack. WPScan can also try username and password combinations to try and gain access to a WordPress site. For this reason, it’s advised that you only run WPScan against a site that you own or have permission to scan.

In this guide, we’ll see how to use WPScan and its various command line options on Kali Linux. Try out some of the examples below to test your own WordPress installation for security vulnerabilities.

In this tutorial you will learn:

  • How to use WPScan
  • How to scan for vulnerabilities with API token

Read more

Benchmarking compression results of a directory with 7zip, the winner of our test

Best compression tool on Linux

There’s no shortage of compression tools available for Linux systems. Having so many choices is ultimately a good thing, but it can also be confusing and make it more difficult to select a compression method to use on your own files. To complicate things further, there is no objectively best tool for every user or system, and we’ll explain why.

When it comes to compression, there are two benchmarks that we need to be concerned with. One is how much space is saved, and the other is how fast the compression process takes place. Another thing to take into consideration is how widespread a certain compression tool is. For example, it’d be much more appropriate to package files into a .zip archive instead of .tar.gz if you know that the archive will need to be opened on a Windows system. Conversely, a .tar.gz archive makes more sense on Linux, since tar files save file permissions.

In this guide, we’ll be looking at a variety of compression tools that are available on the most popular Linux distributions. We’ll compare their compression ratio, speed, and other features. By the end of this guide, you’ll be armed with enough information to choose the best compression tool for any given scenario.

In this tutorial you will learn:

  • Benchmark results of various compression utilities
  • How to conduct your own tests to measure compression ratio and speed
  • Picking a compression utility based on compatibility

Read more

Splitting tar archive into blocks

How to split tar archive into multiple blocks of a specific size

Tar archives can be split into multiple archives of a certain size, which is handy if you need to put a lot of content onto discs. It’s also useful if you have a huge archive that you need to upload, but would rather do it in chunks. In this guide, we’ll show you the commands you need in order to split tar archives into multiple blocks on a Linux system.

This will work regardless of what type of compression (or lack thereof) that you use. So files with extensions like .tar, tar.gz, tar.xz, etc. can all be split into chunks. We’ll also show you how to extract files from archives that have been split into numerous files.

In this tutorial you will learn:

  • How to split tar archives into multiple files
  • How to open split tar archives
Splitting tar archive into blocks

Splitting tar archive into blocks

Read more

Combining files into a split zip archive

How to split zip archive into multiple blocks of a specific size

When compressing large files on a Linux system, it can be handy to split them into multiple blocks of a specific size. This is especially true for squeezing a large archive onto multiple discs, or uploading a large archive online in chunks.

Linux makes this possible with tar files, as we’ve seen in our split tar archive into multiple blocks guide, but you can also do it with zip files.

In this guide, we’ll see the step by step instructions to create a zip archive split into multiple blocks. We’ll also go through the process of unzipping the split archive.

In this tutorial you will learn:

  • How to split zip archives into multiple files
  • How to open split zip archives
Combining files into a split zip archive

Combining files into a split zip archive

Read more

Beginners guide to xz compression on Linux

Beginner’s guide to compression with xz on Linux

xz compression has been rising in popularity because it offers smaller file sizes than gzip and bzip2. You’re still likely to see all three on a Linux system, but you may want to start opting for xz if you want smaller file archives.

In this guide, we’re going to introduce you to xz compression, starting from basic examples to more specific and advanced usage. If you’ve worked with compressed tar files or gzip compression (files with the .tar.gz extension, for example) in the past, you’ll find that xz feels very familiar.

In this tutorial you will learn:

  • How to create xz compressed archives from command line or GUI
  • How to decompress xz archives from command line or GUI
Beginners guide to xz compression on Linux

Beginners guide to xz compression on Linux

Read more

Rocky Linux download

Rocky Linux download

Rocky Linux is an upcoming Linux distribution that will be based on Red Hat Enterprise Linux. For other most popular Linux distributions, please visit our dedicated Linux download page.

For many years, CentOS Linux was a reliable, enterprise-ready distribution based on RHEL. In late 2020, Red Hat announced a change of direction for the distro, which would now be named “CentOS Stream” and exist as an upstream vendor.

In response, CentOS founder Gregory Kurtzer launched Rocky Linux, a project that will inherit the original goals of CentOS. Being based on RHEL means that it will only inherit the most tested and stable components that have been introduced upstream in Fedora and CentOS Stream.

Not much is known about the new distro at this time, except that it should function similarly to CentOS (the CentOS before this change) and will most likely be an appropriate replacement for it. You can stay abreast of the latest news by visiting the official Rocky Linux site, as well as Rocky’s GitHub. We’ll also be updating this article as new information is revealed.

Read more