How to tune Linux extended (ext) filesystems using dumpe2fs and tune2fs

The ext2, ext3 and ext4 filesystems are some of the most known and used filesystems specifically designed for Linux. The first one, ext2 (second extended filesystems) is, as its name suggests, the older of the three. It has no journal feature, which is the biggest advantage of its successor over him: ext3. Released in 2008, ext4 is the more recent, and currently the default filesystem on many Linux distributions.

Read more

mount command in Linux with examples

mount command in Linux with examples

We can use the mount command in Linux to attach file systems and removable devices such as USB flash drives. The default file system for most Linux distributions is ext4. We can also dismount file systems with the unmount command.

Read more

Megatools Linux install and Basic Introduction

Megatools Linux install and Basic Introduction

This tutorial will deal with Megatools Linux install and Basic Introduction. MEGA is one of the most famous cloud storage and file hosting services available. The service offered by the company are normally accessible via web interface or dedicated applications also on smartphone operating systems such as Android or iOS. In this article we see how to access the service from the command line via a free and open source set of tools written in Python: Megatools.

Read more

wipefs Linux command tutorial with examples

wipefs Linux command tutorial with examples

The wipefs Linux command utility can be used to erase various types of signatures from a device (partition tables, filesystem signatures, etc…). It is available in the repository of all the most used Linux distributions, and it is usually installed by default as part of of the util-linux package, which contains also other essentials utilities aimed at system maintenance, so we should never have to install it explicitly. In this tutorial we will see how to use wipefs to gather information about the existing signatures and how to erase them.

Read more

logrotate command in Linux with examples

logrotate command in Linux with examples

In Linux, many applications and system services will store log files. These log files give a Linux administrator insight into how their system is performing, and are invaluable when troubleshooting issues. However, log files can get unwieldy very quickly. For example, if your web server software logs every visit to your website, and you get thousands of viewers per day, there will be way too much information to feasibly squeeze into one text file.

Read more

ls command in Linux with examples

ls command in Linux with examples

The ls command in Linux is one of the most essential commands that every Linux user should know. If you’re a beginner to using the command line, ls is probably the first command you should try to learn. ls is short for list, and is used to list the files in your present working directory or some other directory if you specify one.

Read more

Rsync examples in Linux

Rsync examples in Linux

rsync stands for “remote sync” and is a powerful command line utility for synchronizing directories either on a local system or with remote machines. It’s built into nearly every Linux system by default and this tutorial will help you to understand rsync better by providing you most common rsync examples administrators use to keep the data synchronised across multiple server/hosts.

Some users mistakenly think of rsync as a file copying tool, like cp or scp.While there’s some overlap, rsync excels in synchronization, specifically. In other words, it can take a source directory and make an identical destination directory.

Read more

NFS vs SAMBA vs CIFS

NFS vs SAMBA vs CIFS

NFS, SAMBA, and CIFS are three different terms that get thrown around a lot whenever someone mentions file sharing between two or more systems. But, do you know what these three implementations do, and how they do it differently from one another? For some reason these technologies remain in a shroud of mystery to even some seasoned system administrators.

Read more

Configuring a USB drive to mount automatically in Linux

Automatically mount USB external drive

The default behavior of most Linux systems is to automatically mount a USB storage device (such as a flash drive or external drive) when it gets plugged into the computer. However, this is not the case across every distro, or sometimes configurations go awry and you may find that your device is not being automatically mounted. You may also just want your storage device to mount when you plug it in before booting.

Read more

Configuring a VirtualBox shared folder

How to configure shared VirtualBox folder on Linux

After installing a Linux distro into a VirtualBox virtual machine, you may be wondering how to share files between the host operating syste and the virtual machine itself. One of the easiest and most convenient ways to provide this function is by setting up a VirtualBox shared folder.

Essentially this means that a folder on your host machine can be mounted on the virtual machine, where both systems will be able to access files or drop them in the folder. It doesn’t matter what host operating system you’re using, as the instructions will be the same across Linux, Windows, etc.

In this guide, we’ll go through the step by step instructions to configure a shared VirtualBox folder. We’ll also show you how to mount the shared folder on your Linux system, allowing you to easily share files back and forth.

In this tutorial you will learn:

  • How to configure a shared VirtualBox folder on Linux
  • How to mount a VirtualBox shared folder

Read more

Backing up file permissions on Linux

Backup permissions on Linux

If you’re worried about the file permissions on your Linux system being changed, it’s possible to back up the file permissions of a certain set of files or directories with the getfacl command. You can then restore file permissions en masse by using the setfacl command.

In this guide, we’ll show how to make a backup snapshot of file permissions, as well as how to restore the saved permissions.

In this tutorial you will learn:

  • How to create a backup of file permissions
  • How to restore a backup of file permissions

Read more

USB stick encryption using Linux

USB stick encryption using Linux

If you were to ever lose your USB stick, all data stored on it will be lost. More importantly, your USB stick may end up in the hands of some other person, which will have access to your private files, and use that information in any way they please. This is one of many fears of USB stick users. One of the simplest solutions to this dilemma is to keep only non-private information on the USB stick. Obviously, this would defeat a primary purpose for the storage device.

Another solution is to encrypt your USB stick so it will be accessible only to those users who possess the correct password which will fit to decrypt the USB stick’s encryption. This article will deal with the second solution and that is encryption of a USB stick device. Although encrypting an USB stick seems to be the best and easiest solution, it must be said that it also comes with number of disadvantages. The first disadvantage is that decryption of the USB key must be done using a Linux system that has the dm-crypt module installed.

In other words, you cannot use your encrypted USB stick on any Windows machine and UNIX-like system with older kernels. Therefore, to encrypt only a part of the USB stick which holds only private information seems to be a good solution. In this article, we will go through the step by step instructions of encrypting part of a USB device on Linux. Read on to see how it’s done.

In this tutorial you will learn:

  • How to install cryptsetup on major Linux distros
  • How to partition a USB stick
  • How to encrypt a USB stick partition
  • How to mount encrypted partition

Read more