Starting from CentOS/RHEL 7, resetting of root password has slightly changed than its earlier versions. Let see in this post how we can recover a lost root password on a CentOS/RHEL 8 machine. Breaking Boot Sequence 1. Reboot the system and interrupt the boot loader sequence by pressing any key. 2. Move the cursor to […]
Archives for May 2020
How to Count lines in a file in UNIX/Linux
Question: I have a file on my Linux system having a lot of lines. How do I count the total number of lines in the file? Using “wc -l” There are several ways to count lines in a file. But one of the easiest and widely used way is to use “wc -l”. The wc […]
How to Change the default kernel (boot from old kernel) in CentOS/RHEL 8
In case you have multiple kernels installed in the system, you can boot from a specific kernel in case of a downgrade or any other requirement. Let’s see for the purpose of this blog post, how to revert back to an older kernel in CentOS/RHEL 8. Before moving forward, let’s understand how to view the […]
How to list or install only security updates with dnf in CentOS/RHEL 8
Question: Is it possible to limit dnf so that it lists or installs only security updates? How to patch the system only with security errata? This post explains how to list and install security updates using dnf on CentOS/RHEL 8. To list security updates 1. To list advisories about newer versions of installed packages (default): […]
How to activate a “SUSPENDED” LVM physical volume
When suspending a device using the command dmsetup suspend, any I/O that has already been mapped by the device but has not yet completed will be flushed. For example, lvextend command was executed and for some reason, it did not finish. This will keep the volume in suspended mode and all I/O will be blocked. […]