How to update Grub configuration on CentOS server
Simply update Grub on CentOS server. Inspect Grub defaults. $ cat /etc/default/grub GRUB_TIMEOUT=1 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved...
View ArticleHow to recover deleted photos
Recover deleted photos from SD card. Install testdisk application. $ sudo apt install testdisk Reading package lists... Done Building dependency tree Reading state information... Done The following...
View ArticleHow to load time zone tables into MariaDB server
Load time zone tables into MariaDB server. Determine if time_zone tables are loaded. $ mariadb --skip-column-names --batch --execute "SELECT CONVERT_TZ('2021-04-21 13:00:00','GMT','Europe/Berlin') AS...
View ArticleHow to increase the maximum permitted connections to MariaDB server
Increase the maximum permitted number of simultaneous connections to the MariaDB server. The moment you see the following message will mean that you have reached the concurrent connections limit. ERROR...
View ArticleHow to concatenate regular and gzip compressed files
Concatenate regular and gzip-compressed files at the same time. Assume that we want to feed regular and gzip-compressed files to an unspecified applications. $ ls /var/log/apt/history.log*...
View ArticleHow to parse apt history log
Use awk to parse apt history log and filter it. Python is better suited for this task, but the following awk code will help you get started. #!/bin/bash # Parse apt history log - shorter version #...
View ArticleHow to configure MariaDB to log slow queries
Configure MariaDB server to log slow queries. Log slow queries to a file Check log_output variable. $ sudo mariadb --skip-column-names --batch --execute "show variables like 'log_output'" log_output...
View ArticleHow to open Firefox bookmarks using Rofi
Open Firefox bookmarks using Rofi a window switcher, application launcher and dmenu replacement. Browse Firefox bookmarks Browse Firefox bookmarks using rofi_firefox_tree.sh shell script. ❯ batcat...
View ArticleHow to export block devices list as JSON
Export block devices list as JSON and parse using jq utility. List block devices as JSON and print the size using human-readable format. $ lsblk --json { "blockdevices": [ {"name":"loop0",...
View ArticleHow to create Hadoop cluster
Create a basic Hadoop cluster to play with it. Initial information The goal is to create a basic Hadoop cluster for testing purposes. I will set up the following servers using Hadoop 3.2.2, although...
View ArticleHow to clear Pi-hole audited domains list
Alter or clear audited domains list on Pi-hole instance. You can mark domains as audited to simply hide these, but there is no web interface to manage domains that have been already audited. Alter...
View ArticleHow to deal with high user id in a dockerfile
Solve the issue related to the high user id in a dockerfile. At first, create a simple docker image with a custom user. FROM debian:bullseye RUN groupadd --gid 1000 milosz \ && useradd --uid...
View ArticleHow to upgrade Ubuntu distribution using GUI
Upgrade Ubuntu distribution from 20.10 to 21.04 using GUI. At first, perform a backup, ensure that you have a bootable version of the operating system if something goes wrong, and reserve some free...
View ArticleHow to open LUKS2 encrypted volume on a low memory device
Open LUKS2 encrypted volume on a low memory device. There are those rare situations when you cannot open LUKS encrypted volume on a low memory device. $ sudo cryptsetup luksOpen /dev/sda1...
View ArticleHow to display current mappings for encrypted devices
Display current mappings for encrypted devices (LUKS) . List block devices Use lsblk list mode to display encrypted devices. $ lsblk --list | awk '$6 == "TYPE" || $6 == "crypt" {print}' NAME MAJ:MIN RM...
View ArticleHow to switch from Dropbear to OpenSSH on DietPi
Switch from Dropbear to OpenSSH on DietPi. Dropbear SSH is a great solution for embedded devices, but sometimes I want to use a plain old OpenSSH server. To use the full-blown OpenSSH server you need...
View ArticleWhere to find Audacity fork
It is the time to look for a fork due to recent changes to the Audacity privacy policy (GitHub issue New privacy policy is completely unacceptable! #1213), Contributor License Agreement, and telemetry...
View ArticleHow to install ArchiveBox on RaspberryPi
Install beloved ArchiveBox on RaspberryPi3. Operating system I will use DietPi operating system as it suits my personal preference. Perform initial setup and pure minimal installation. I will use...
View ArticleHow to perform basic HDFS operations
Let’s perform basic HDFS operations. List local files. $ ls -l -h ~/log/ total 488K -rw-r--r-- 1 hadoop hadoop 22K May 13 20:11 alternatives.log drwxr-xr-x 2 hadoop hadoop 4.0K May 13 20:11 apt...
View ArticleHow to display IP address in a more readable format
Display IP address in a more readable format. By default, the IP or IPv6 address blends with the rest of the information. $ ip address 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen...
View Article