article-main

How to set filesystems mount order on modern Linux distributions

In a previous tutorial we discussed about the /etc/fstab file, and how it is used to declare the filesystems which should be mounted on boot. In the pre-Systemd era, filesystem where mounted in the order specified in the /etc/fstab file; on modern Linux distributions, instead, for a faster boot, filesystem are mounted in parallel. Systemd manages the mounting of filesystems via specifically designed units automatically generated from /etc/fstab entries. For these reasons a different strategy must be adopted to establish the dependency between two filesystems, and therefore to set their correct mount order.

Read more

article-main

How to create snapshots of QEMU/KVM guests

KVM (Kernel-based Virtual Machine) is the virtualization solution (type 1 hypervisor) included in the Linux kernel, which, by default, is used together with QEMU, the userspace software which actually performs the guest systems emulation (type 2 hypervisor). In a previous tutorial we saw how to create and manage KVM virtual machines from the command line; in this article, instead, we will learn how to create and manage guest systems snapshots using tools like virsh and virt-manager.

Read more

article-main

How to disable Plymouth on Linux

Plymouth is an application originally developed by Red Hat and later adopted basically by all the most commonly used Linux distributions. The software runs very early in the boot process, and provides eye-candy animations which accompany the user until he is prompted to login into the system. When Plymouth is used, boot messages are hidden, although they can be visualized simply by clicking the esc key. Some users, however, may prefer to visualize boot messages by default, and avoid any animation.

Read more

article-main

How to run commands periodically with anacron on Linux

When we need to schedule a task on a Linux system we can use utilities like cron or systemd-timers. Various implementations of cron exist, but they have in common the fact that they run as a system service, and are designed to be used on systems which are always up and running, like servers. When we need to schedule a task on a desktop or a notebook, which are turned off more often, we can use anacron instead.

Read more

article-main

Ansible Vault Tutorial

In previous tutorials we discussed Ansible, a great tool we can use for automation and provisioning. We talked about basic Ansible concepts, we saw some of the most used Ansible modules, how to manage variables and how to perform basic loops in playbooks; now it’s time to see how to protect sensitive information which sometimes may be needed to accomplish some tasks. In order to protect sensitive information when using Ansible, we encrypt them with Ansible Vault.

Read more

How to backup gpg keys on paper

Having a reliable backup of our GPG (Gnu Privacy Guard) secret key is not optional: the key represents our identity, and loosing it could potentially be a disaster. Creating a backup of our keys and sub-keys is quite a simple thing to do using gpg, and the resulting files can be easily backed up on one or more devices. Electronic devices such USB drives or hard disks, however, tend to fail, and usually in the most inappropriate times; therefore as an extreme resort, we may want to print our keys to paper.

Read more

article-main

How to unlock a LUKS volume on boot on Raspberry Pi OS

LUKS (Linux Unified Key Setup) is the de facto standard encryption method used on Linux-based operating systems. As we saw in previous tutorials, when we want a partition or raw disk encrypted using LUKS to be automatically unlocked at boot, we need to enter a dedicated line into the /etc/crypttab file. Doing so, we are prompted to provide the encryption password interactively. This is quite straightforward on laptop or desktop machines, but how can we unlock a volume on an headless server? One solution is to use dropbear to get ssh access at an early boot stage, in the initramfs, in order to provide the volume password.

Read more

How to backup data with Déjà Dup on Linux

Déjà Dup is a free an open source program we can use to easily create incremental data backups on Linux. The program is basically a graphical frontend for Duplicity; its goal is to hide complexity, be simple and easy to use. Backups created with Déjà Dup can be encrypted and stored locally and remotely, even using storage space provided by services like Google Drive.

Read more

article-main

How to create incremental system backups with Timeshift on Linux

Linux-based operating systems, if well configured, are really stable; however, since bad things can always happen, it is a good idea to regularly create backups. As we saw in previous articles, there are many types of backup, and many possible backup strategies which can be implemented on Linux, using free and open source software. In this article we focus on Timeshift, an application which allows us to create incremental backups of our Linux system. The tool is similar to the Apple Time Machine, and can work as a frontend for rsync or use the BTRFS filesystem snapshot feature under the hood.

Read more

article-main

How to install and configure Starship on Linux

One of the things that make Linux-based operating systems great is the high degree of customization they offer us. We can customize and adapt (almost) everything to our needs, from the options the kernel is compiled with, to the  desktop environment. On any Linux distribution, the terminal emulator is an essential tool for power users and system administrators. Starship is a free and open source plugin written in rust we can use to customize our favorite shell prompt by using a variety of modules.

Read more

article-main

3 Methods to install PyCharm Community Edition on Linux

PyCharm is a professional Python IDE (Integrated Development Environment) developed by JetBrains, which supports a lot of features like code completion, refactoring, debugging, etc. Two versions of the IDE exist: the “Professional” version, which must be purchased, and the free, “Community” version, which is based on open source software, and can be downloaded and installed free of charge. Various methods can be used to install the IDE on Linux.

Read more