How to manage LXD containers as regular user

Manage LXD containers as regular user. ...

How to display UUID for Linux Software RAID devices

Display Universally Unique Identifiers (UUID) for Linux Software RAID devices. ...

How to inspect mount options

Inspect mount options for specific mountpoint or device. ...

How to display inotify watches and instances using dedicated application

Display inotify watches and instances using dedicated inotify-info reporting application. ...

How to securely edit configuration files as specific user

Securely edit configuration files as specific user. ...

April 26, 2023 · milosz · Linux

How to list manually installed packages

List manually installed packages. ...

How to increase the maximum number of file watches that are allowed for each user

Increase the maximum number of file watches that are allowed for each user. ...

How to display OpenSSH daemon configuration

Display OpenSSH daemon configuration. ...

April 17, 2023 · milosz · OpenSSH

How to distinguish between rotational and non-rotational block devices

Distinguish between rotational and non-rotational block devices. ...

How to display systemd journal since system boot

Display systemd journal since system boot. ...

How to display basic computer information using DMI table decoder

Display basic computer information using DMI table decoder. ...

How to control the wget dot display

Control the wget dot display to pretty-print retrieval status for large files which proved to be useful inside shell script or CI/CD jobs. ...

March 29, 2023 · milosz

How to check version of a dockerized application

Check version of a dockerized application using a very simple idea. ...

March 27, 2023 · milosz · Docker

How to inspect OpenSSH configuration

Inspect OpenSSH configuration. ...

March 22, 2023 · milosz · OpenSSH

How to add or remove user from a group

Add or remove user from a group using multiple different utilities. ...

March 20, 2023 · milosz

How to identify hardware network interfaces

Identify hardware network interfaces. ...

March 17, 2023 · milosz · JSON

How to bind to a non-local IP address

Ensure that HAProxy can assign a non-local IP address. ...

How to determine command used to start docker conainer

Determine command used to start docker conainer using runlike utility. ...

How to keep specific package version

Downgrade and keep specific package version. ...

How to perform S.M.A.R.T. test

Use smartmontools (S.M.A.R.T. monitoring tools) on Debian-based operating system to perform disk check. ...

March 1, 2023 · milosz

How to configure Advanced Power Management features on removable hard drives

Configure Advanced Power Management features on removable hard drives. ...

How to determine software RAID array state

Determine software RAID array (Multiple Device driver aka Linux Software RAID) state using command-line utility. ...

How to enable write-intent bitmap on software RAID devices

Enable write-intent bitmap (internal) on software RAID devices (Multiple Device driver aka Linux Software RAID). ...

How to configure Wake-on-LAN using systemd

Configure Wake-on-LAN using systemd. ...

How to execute systemctl command asynchronously

Execute systemctl command asynchronously and do not wait for its completion. ...

January 23, 2023 · milosz · systemd

How to fix missing GRUB device map file

Sometimes GRUB can complain about missing device map file. ...

January 21, 2023 · milosz

How to start interactive shell using systemd machine manager

Start interactive shell using systemd machine manager. ...

January 11, 2023 · milosz · systemd

How to enable Consul maintenance mode

Enable HashiCorp Consul maintenance mode. ...

How to inspect firmware update using RACADM command-line utility

Inspect firmware update using RACADM command-line utility which provides a scriptable interface for Remote Access Controller. ...

December 30, 2022 · milosz

How to force curl to use HTTPS protocol

Force curl to use HTTPS protocol. ...

December 23, 2022 · milosz

How to display hardware information the easy way

Display hardware information using inxi a full featured system information script. ...

December 12, 2022 · milosz · Ubuntu

How to execute Varnish Test Cases

Execute Varnish Test Cases to test Varnish HTTP Cache and HAProxy configuration. ...

December 7, 2022 · milosz · varnish

How to determine available LXD server resources

Determine available LXD server resources. ...

December 2, 2022 · milosz · LXD

How to display IPv4 addresses without network utilities

Display IPv4 address without network utilities. ...

November 30, 2022 · milosz

How to determine when Consul snapshot was created

Determine when HashiCorp Consul snapshot was created. ...

November 29, 2022 · milosz · AWK · Consul

How to create Consul snapshots for disaster recovery

Create HasiCorp Consul snapshots for disaster recovery. ...

November 25, 2022 · milosz · Consul

How to create Mastodon maintenance jobs

Create Mastodon maintenance jobs for bare-metal Mastodon installation from source code. ...

November 19, 2022 · milosz · Mastodon

How to create persistent sysfs configuration using systemd

Create persistent sysfs configuration using systemd which can replace sysfsutils. ...

November 18, 2022 · milosz · systemd

How to inspect a path during the troubleshooting process

Inspect a path during the troubleshooting process. ...

How to install Guest Agent inside Proxmox virtual machine

Install Guest Agent inside Proxmox virtual machine. ...

How to check consistency of an EC or RSA private key

Check the consistency of an EC or RSA private key. ...

November 7, 2022 · milosz · OpenSSL

How to locate modified systemd unit configuration files

Locate modified systemd unit configuration files. ...

November 4, 2022 · milosz · systemd

How to load kernel modules at boot

Load kernel modules at boot. ...

How to determine when package index was updated

Determine when package index was updated. ...

How to determine when service was started

Determine when systemd service was started. ...

October 24, 2022 · milosz · systemd

How to check memory subsystem from user space

Check memory subsystem from user space. ...

How to install and configure NTP server

Install and configure chrony NTP server. ...

How to inspect dnf configuration

Inspect dnf configuration. ...

How to copy Proxmox virtual machine to another server

Copy Proxmox virtual machine to another server. ...

October 10, 2022 · milosz · Proxmox

How to configure OpenSSH server to use legacy public key algorithm to authenticate itself to an SSH client

Configure OpenSSH server to use legacy public key algorithm to authenticate itself to an SSH client. ...

October 7, 2022 · milosz · OpenSSH

How to install HasiCorp Vault

Install and configure HashiCorp Vault. ...

October 5, 2022 · milosz · Vault

How to display active but disabled systemd services

Display active but disabled systemd services. ...

How to instruct consul to disable automatic checking for updates

Instruct consul to disable automatic checking for updates. ...

September 30, 2022 · milosz · Consul

How to configure Unbound DNS validating resolver

Configure Unbound DNS validating resolver. ...

How to display currently connected wireless network

Display the name of the wireless network you are connected to. ...

How to configure Consul Access Control Lists

Configure Consul Access Control Lists. ...

September 23, 2022 · milosz · Consul

How to parse and filter dpkg database

Parse and filter dpkg database to display selected fields or other specific information. ...

How to scan wireless networks

Scan wireless networks. ...

How to access service socket as a regular user

Create an exception for a regular user to access service socket using systemd. ...

How to secure Consul communication

Secure Consul communication. ...

September 9, 2022 · milosz · Consul

How to determine maximum memory capacity

Determine maximum memory capacity. ...

September 7, 2022 · milosz · Hardware

How to display hardware information

Display hardware information. ...

How to install and configure Consul

Install and configure Consul. ...

How to forward port using Dynamic Firewall Manager

Forward port (IPv4 only) using Dynamic Firewall Manager. ...

How to configure persistent DNS resolver

Configure persistent DNS resolver using systemd resolver or name server information handler. ...

How to noninteractively configure system locales

Noninteractively configure system locales. ...

How to use consistent exit codes in shell scripts

Read sysexits FreeBSD manual page to learn how to use consistent exit codes in shell scripts. ...

How to determine fastest server using ICMP

Determine fastest server using the Internet Control Message Protocol (ICMP). ...

How to define ticket lifetime and renewable time

Define ticket lifetime and renewable time when using MIT Kerberos. ...

August 1, 2022 · milosz · Kerberos

How to flush buffers on a specific device

Flush buffers on a specific device using blockdev utility. ...

How to increase the limit of the mmap counts

Increase the limit of the mmap counts for Elasticsearch service. ...

How to alter date format when listing cached Kerberos tickets

Alter date format when listing cached Kerberos tickets. ...

How to disable IPv6 on Raspberry Pi 4

Disable IPv6 on Raspberry Pi 4. ...

How to configure HashiCorp repository

Configure HashiCorp repository. ...

How to reload network configuration

Reload network configuration on Debian Bullseye. ...

How to create Virtual eXtensible Local Area Network interfaces

Create and configure Virtual eXtensible Local Area Network interfaces. ...

How to instruct dnf to skip confirmation dialog

Instruct dnf to skip confirmation dialog and assume yes for every question. ...

How to ensure that every Ubuntu virtual machine get its own IP address

Ensure that every Ubuntu virtual machine from the same template get its own IP address. ...

How to automatically rollover Elasticsearch index

Automatically rollover Elasticsearch index using by time. ...

How to install recent kernel using experimental Debian distribution

Install the most recent kernel using experimental Debian distribution to see what is coming up. ...

How to display systemd journal for specific service since it started

Display systemd journal for specific service since it started. ...

How to display CPU information

Display CPU information. ...

How to configure multiple IP addresses on Raspberry Pi device

Configure multiple IPv4 addresses on Raspberry Pi device. ...

How to determine when service was started and stopped using the systemd journal

Determine when the service was started and stopped using the systemd journal. ...

How to display boot times and uptime using systemd journal

Display when the operating system was booted and calculate uptime using the systemd journal. ...

How to provide custom TXT records in CHAOS class using BIND9

How to provide custom TXT records in class 3 (CHAOS) using BIND9. ...

How to renew Kerberos ticket

Renew Kerberos ticket. ...

How to mount host directory inside LXD container

Mount host directory inside LXD container. ...

June 8, 2022 · milosz · LXD

How to display BIND version and hide it

Display the BIND version and learn how to hide it. ...

June 3, 2022 · milosz · BIND

How to disable onboard WiFi and Bluetooth on Raspberry Pi 4

Disable onboard WiFi and Bluetooth on Raspberry Pi 4 device. ...

How to configure minimal MIT Kerberos server

Configure minimal MIT Kerberos server. ...

How to specify the exact list of enabled PAM profiles

Specify the exact list of enabled PAM profiles using a simple workaround. ...

How to unlock user account in Samba Active Directory

Unlock user account in Samba Active Directory ...

How to configure static IP address on Raspberry Pi

Configure static IP address on Raspberry Pi 4 device. ...

How to access wireless network on Raspberry Pi

Configure wireless network on Raspberry Pi 4. ...

How to configure SSH access using Samba Active Directory

Configure SSH access using Samba Active Directory. ...

How to manage global password policy settings in Samba Active Directory

Manage global password policy settings in Samba Active Directory. ...

How to manage UNIX groups and users in Samba Active Directory

Manage UNIX groups and users in Samba Active Directory. ...

How to create Samba Active Directory server

Create Samba Active Directory server using Debian Bullseye. ...

How to parse the fastest available dnf mirror data

Parse the fastest available dnf mirror data. ...

How to improve dnf download times

Improve dnf download times. ...

How to fix failed dynamic DNS update with Samba Active Directory and System Security Services Daemon

Fix failed dynamic DNS update with Samba Active Directory and System Security Services Daemon by upgrading internal Samba DNS to BIND. ...

How to determine fastest APT server using the ICMP

Determine fastest APT server using the Internet Control Message Protocol (ICMP). ...

How to take advantage of Docker to install Mastodon

Take advantage of Docker to install Mastodon. ...

How to install Ubuntu Release Upgrader on an older system

Install Ubuntu Release Upgrader on an older system. ...

How to check System Security Services Daemon configuration

Check System Security Services Daemon configuration. ...

April 27, 2022 · milosz · sssd

How to configure System Security Services Daemon disable SUDO Smart Refresh task

Configure System Security Services Daemon to disable SUDO Smart Refresh task. ...

How does Samsung SSD T7 perform on Raspberry Pi

Brief note about Samsung SSD T7 on Raspberry Pi 4 which provided a nice boost to my personal GitLab instance at home. The performance is strongly limited due to Raspberry Pi device constraints, but it is still much better than regular HDD. ...

How identify Raspberry Pi device using built-in leds

Identify Raspberry Pi device using built-in leds. ...

How to configure System Security Services Daemon to update Active Directory DNS using custom interval

Configure System Security Services Daemon (sssd) to update Active Directory DNS using the custom interval. ...

How to display remote address using Nginx

A long time ago I have described how to check external IP address using ssh, so today I will display remote address using Nginx web server. ...

April 11, 2022 · milosz · nginx

How to determine mountpoint filesystem type

Determine mountpoint filesystem type using core stat utility which is expected to exist on every operating system. ...

How to delay the start of the systemd service

Delay the start of the systemd service at boot. ...

How to display Raspberry Pi serial number

Display Raspberry Pi serial number using standard command-line utilities. ...

How to determine cipher used to encrypt the private key

Use openssl utility to determine cipher used to encrypt the private key. ...

March 25, 2022 · milosz · OpenSSL

How to display information about NVMe storage device

Display information about NVMe storage device. ...

How to share USB device over network

Share USB device over network using usbip utility. ...

How to create and encrypt RSA or EC private key using general utilities

Create and encrypt RSA or EC private key using general utilities. There are multiple possibilities, so let me sum it up. ...

March 9, 2022 · milosz · OpenSSL

How to create and encrypt RSA or EC private key

Create and encrypt RSA or EC private key using dedicated utilities. ...

February 18, 2022 · milosz · OpenSSL

How to inspect LVM history using metadata archives

Inspect LVM history using metadata archives. ...

February 14, 2022 · milosz · LVM

How to keep a list of permanent ARP entries

Keep a list of permanent ARP entries using the arp utility. ...

How to extend LVM logical volume without free space on the root partition

Extend LVM logical volume without free space on the root partition. ...

February 9, 2022 · milosz · LVM

How to use LVM thin provisioning

Configure and use LVM thin provisioning. ...

How to define control domain memory inside XCP-ng

Define control domain memory inside XCP-ng. ...

December 22, 2021 · milosz · XCP-ng

How to take the advantage of dynamic DNS resolution in NGINX

Take the advantage of dynamic DNS resolution in an open-source version of NGINX. ...

December 15, 2021 · milosz · nginx

How to install OpenSSH on DietPi operating system

Use internal DietPi utilities is to switch from a Dropbear to OpenSSH Server. ...

How to rotate Kafka logs

Alter Log4j configuration to rotate Kafka logs. ...

December 10, 2021 · milosz · Kafka

How to enable memory cgroup on DietPi

Enable memory cgroup on a Raspberry Pi with DietPi an extremely lightweight Debian operating system. ...

How to downgrade cgroup version on DietPi

DietPi an extremely lightweight Debian OS is using cgroup v2 on Raspberry Pi, but this causes warning when using snap packages… ...

How to use tmpfs for temporary directory

How to use tmpfs for temporary directory (/tmp). ...

How to resize live tmpfs filesystem

Resize live tmpfs filesystem. ...

How to align simple MariaDB output

Use column utility to align simple MariaDB output like variable list. ...

How to relay all mail to external account

Relay all mail to an external account which can come in handy in your lab environment. ...

How to log HDFS operations

Perform HDFS audit logging. ...

September 27, 2021 · milosz · Hadoop

How to create Yarn nodes whitelist

Create Yarn nodes whitelist. ...

September 22, 2021 · milosz · Hadoop

How to save namespace and perform checkpoint

Save namespace on namenode and perform checkpoint on secondary namenode. ...

September 20, 2021 · milosz · Hadoop

How to inspect Hadoop configuration using command-line

Inspect Hadoop configuration using command-line. ...

September 15, 2021 · milosz · Hadoop

How to mount HDFS as a local file system

Mount HDFS as a local file system. ...

September 13, 2021 · milosz · Hadoop

How to create Hadoop data nodes whitelist

Create Hadoop data nodes whitelist. ...

September 1, 2021 · milosz · Hadoop

How to leave Hadoop safe mode

The Hadoop cluster enters safe mode during the name node startup till the basic indicators are met and later in case of emergency, which means that the cluster enters read-only mode. ...

August 30, 2021 · milosz · Hadoop

How to install SmokePing on Debian Bullseye

Keep track of network latency using SmokePing on Debian Bullseye. ...

How to limit the number of available processors

Use boot parameters to limit the number of available processors. ...

How to decommission Yarn node

Decommission Yarn node with minimal impact on the running applications. ...

August 23, 2021 · milosz · Hadoop

How to manage custom DNS records on a Pi-hole instance

Use dnsmasq directly to manage custom DNS records on a Pi-hole instance. ...

How to decommission HDFS datanode

Decommission HDFS data node with minimal impact on the running applications. ...

August 18, 2021 · milosz · Hadoop

How to create LXD image from an existing snapshot

Create LXD image from an existing snapshot. ...

August 16, 2021 · milosz · LXD

How to display Hadoop cluster report

Display Hadoop cluster report. ...

August 13, 2021 · milosz · Hadoop

How to disable Pi-hole query rate-limiting

Disable Pi-hole query rate-limiting in a local lab as rate-limited queries get a REFUSED reply and are not further processed by FTL. ...

August 11, 2021 · milosz · Pi-hole

How to install DNS lookup utility

Install DNS lookup utility to perform basic DNS lookups. ...

How to load native Hadoop libraries

Hadoop has a native implementation for certain components, but sometimes it does not load automatically. ...

August 6, 2021 · milosz · Hadoop

How to update Hadoop heartbeat interval

Update Hadoop heartbeat interval to mark data node as dead at the predefined period of time depending on your requirement. ...

August 2, 2021 · milosz · Hadoop

How to perform reverse DNS lookups

Perform reverse DNS lookups to map addresses to names. ...

July 30, 2021 · milosz

How to validate Hadoop configuration files

Validate Hadoop configuration XML files. ...

July 28, 2021 · milosz · Hadoop

How to determine which SSH public key was uploaded to the web service

Determine which SSH public key was uploaded to the web service. ...

How to configure Hadoop topology mapping

Configure Hadoop topology mapping using TXT DNS records. ...

July 21, 2021 · milosz · Hadoop

How to display IP address in a more readable format

Display IP address in a more readable format. ...

How to perform basic HDFS operations

Let’s perform basic HDFS operations. ...

July 14, 2021 · milosz · Hadoop

How to switch from Dropbear to OpenSSH on DietPi

Switch from Dropbear to OpenSSH on DietPi. ...

How to display current mappings for encrypted devices

Display current mappings for encrypted devices (LUKS) . ...

July 7, 2021 · milosz · JSON

How to open LUKS2 encrypted volume on a low memory device

Open LUKS2 encrypted volume on a low memory device. ...

How to clear Pi-hole audited domains list

Alter or clear audited domains list on Pi-hole instance. ...

June 30, 2021 · milosz · Pi-hole

How to create Hadoop cluster

Create a basic Hadoop cluster to play with it. ...

How to export block devices list as JSON

Export block devices list as JSON and parse using jq utility. ...

How to configure MariaDB to log slow queries

Configure MariaDB server to log slow queries. ...

How to parse apt history log

Use awk to parse apt history log and filter it. ...

How to concatenate regular and gzip compressed files

Concatenate regular and gzip-compressed files at the same time. ...

How to increase the maximum permitted connections to MariaDB server

Increase the maximum permitted number of simultaneous connections to the MariaDB server. ...

How to load time zone tables into MariaDB server

Load time zone tables into MariaDB server. ...

How to update Grub configuration on CentOS server

Simply update Grub on CentOS server. ...

June 7, 2021 · milosz · CentOS

How to log systemd service state changes

Log systemd service state changes using rsyslog. ...

How to display current date-time in different timezone

Use date utility to display current date time in different timezone ...

How to start service on the privileged port as a regular user

Start service on the privileged port as a regular user. ...

May 26, 2021 · milosz · Ubuntu

How to update tar archive

Update tar archive. ...

May 21, 2021 · milosz · Backup

How to access specific file occurrence in tar archive

Access specific file occurrence in tar archive. ...

May 14, 2021 · milosz

How to encrypt or decrypt files using OpenSSL utility

Use OpenSSL utility to encrypt or decrypt files. ...

May 12, 2021 · milosz · OpenSSL

How to get service PID using systemctl

Use systemctl to get process identifier for specified service. ...

How to wipe partition-table signatures with one exception

Today I will extend the how to fix device excluded by a filter blog post to include information on how to wipe filesystem or partition-table signatures except for LVM2 members, which is a great idea for automation. ...

How to display kernel slab cache information

You can directly inspect kernel slab allocator statistics (/proc/slabinfo file) for detailed information on buffer, inode, dentry, or other caches in the Linux kernel, though slabtop utility will sort and pretty-print information in real-time. ...

How to disable Network Manager connectivity checks

Four different ways to disable Network Manager connectivity checks. ...

April 23, 2021 · milosz · Ubuntu

How to get package URL on CentOS

Sometimes I need to get the package URL on CentOS to store it using Nexus Repository Manager. At first glance, it is not very obvious how to display package URLs, but the actual process is very simple. ...

April 21, 2021 · milosz · CentOS

How to use Nginx reverse proxy to limit external calls inside web-browser

Use Nginx reverse proxy to add Content-Security-Policy header and disable phoning home or external analytics inside web-browser. ...

April 19, 2021 · milosz

How to dry-run CentOS upgrade process

Use tsflags plugin to test upgrade process before executing it. ...

April 16, 2021 · milosz · CentOS

How to extend RandR valid modes for an output

Using passive adapters to connect DisplayPort output to HDMI or DVI input is problematic with wide-screen monitors as these adapters supports a maximum resolution of 1920×1200 at 60Hz. This issue can be alleviated by adding a specific mode to the set of valid output modes. ...

April 14, 2021 · milosz · Ubuntu

How to write an operating system to microSD card using graphical user interface

Write an operating system to microSD card using Raspberry Pi Imaging Utility. ...

How to deal with overlapping LVM names

Today, I will connect the secondary encrypted hard disk from the previous Ubuntu installation to copy personal data, so there will be a problem with overlapping LVM names. ...

April 7, 2021 · milosz · LVM · Ubuntu

How to suppress SSH banner

Suppress SSH banner when executing ad-hoc commands. ...

April 5, 2021 · milosz · OpenSSH

How to export every LXD instance at once

Export every LXD instance at once. ...

March 31, 2021 · milosz · LXD

How to use lightweight compressed cache for swap pages

Configure a lightweight compressed cache for swap pages to mitigate the performance impact of swapping on your desktop. ...

How to list file names and their contents

Use basic Linux utilities to list file names and their contents. ...

How to configure swap using zram at boot

Configure compressed swap using zram device at system boot. ...

How to use compressed RAM based block devices

Take advantage of compressed RAM based block devices to create temporary filesystems and swap disks. ...

How to fix device excluded by a filter

Fix “device excluded by a filter” LVM error. ...

How to create the simplest possible nftables firewall

Create the simplest possible firewall using nftables framework with relaxed rules that will allow all outgoing traffic, incoming ICMP echo requests, and ssh connections. ...

How do display physical volumes associated with the volume group

Display physical volumes associated with the volume group. ...

February 17, 2021 · milosz · LVM

How to use templates inside shell scripts

Use templates inside shell scripts by substituting environment variables. ...

February 15, 2021 · milosz · Bash · Debian

How to lock specified packages from being updated

Use versionlock plugin to protect packages from being updated on the CentOS operating system. ...

February 10, 2021 · milosz · CentOS

How to display strace summary

I have already described how to strace PHP-FPM processes, but you can also display a strace summary to get detailed information about count time, calls, and errors for each syscall. ...

How to define JAVA_HOME

Determine and set JAVA_HOME to execute Java command-line applications. ...

February 3, 2021 · milosz · Java

How to restart service on every configuration change

Monitor file system events to restart service on every configuration change. ...

How to fix multipath daemon error about missing path when using VirtualBox

Fix multipath daemon error about missing path when using VirtualBox. ...

How to log specific Varnish requests

Use varnishlog to log specific Varnish requests. ...

How to use virtual memory filesystem to store Varnish Shared memory Log

Varnish Shared memory Log can put a major strain on the disk (I/O write operations). The solution is to store it on the virtual memory filesystem. ...

How to restart systemd service in case of failure

Configure systemd service to be restarted in case of failure. ...

How to determine which services need to be restarted

Use needrestart utility to determine which services need to be restarted after the upgrade. ...

How to deal with many small log files using Filebeat

Use Filebeat to deal with many small log files. ...

How to log SSL cipher and protocol information in Nginx

Define custom Nginx log format to store SSL cipher and protocol information. ...

How to access rdiff-backup repository using fuse

Use FUSE (filesystem in userspace) to access rdiff-backup repository. ...

How to enforce dynamically generated passwords for basic authentication

Use HAProxy with Lua to enforce dynamically generated passwords for basic authentication. ...

November 11, 2020 · milosz · HAProxy · Lua

How to create custom bash prompt

Today, I will show you my personal shell prompt, so you could define your own custom bash prompt. ...

How to execute rc.local shell script during boot using systemd

Execute rc.local shell script during boot using systemd compatibility generator. ...

How to perform shell script analysis

Perform shell script analysis using shellcheck, a shell script static analysis tool. ...

How to display packages that are no longer required

Display packages that were installed automatically to satisfy various dependencies and are no longer required. ...

How to calculate Elasticsearch average documents number in recent days

Calculate Elasticsearch’s average documents number in recent days using a shell script. ...

How extend existing ext4 filesystem using systemd service

Use systemd service to automatically extend existing ext4 filesystem on boot or on-demand to optimize virtual machine configuration. ...

How to retry Elasticsearch shard allocation

Retry Elasticsearch shard allocation that was blocked due to too many subsequent allocation failures. ...

How to format and beautify Nginx configuration

Format and beautify Nginx configuration using dedicated utilities like nginx-config-formatter, nginxbeautifier, and crossplane. ...

How to display bind mounts

The simplest possible solution to display bind mounts. ...

How to calculate Elasticsearch hit ratio

Calculate Elasticsearch hit ratio using command-line curl utility. ...

How to dockerize rdiff-backup with web interface

Dockerize rdiff-backup to create a personal single-user instance with SSH and web interface provided by rdiffweb. ...

How to increase the number of connection attempts when using ansible

Increase the number of connection attempts when using ansible utility. ...

How to create or delete Kibana index pattern using API

Display, search, create or delete the Kibana index pattern using API. ...

How to alter Ubuntu desktop configuration using terminal

Alter Ubuntu desktop configuration using gsettings utility. I will use it to change the number of seconds the desktop computer needs to be inactive before it goes to sleep. ...

How to inspect parent processes

Inspect parent processes to determine whether shell script or specific process has been executed locally, remotely, or by any other application. ...

How to manage RPM keyring

Today, I will show you how to manage RPM keyring on the CentOS operating system using a real life example. ...

How to fix SmokePing SSH probe on Debian Buster

SmokePing 2.7.3 needs an update to use the SSH probe on Debian Buster. ...

How to determine available authentication methods

Determine available authentication methods on the specified OpenSSH server. ...

How disable network redirections

Create custom Bourne Again SHell package to disable network redirections and enhance system security. ...

How to serve single file using HAProxy

Use simple HAProxy configuration hacks to serve a single static file. ...

How to inspect OpenSSH client configuration

Inspect OpenSSH client configuration to search and display configured hosts. ...

How to merge multi-process HAProxy statistics using GNU Awk

Merge multi-process HAProxy statistics using GNU Awk. This is a duct tape solution, as you should definitely use Lua. ...

How to merge multi-process HAProxy statistics using Lua

Merge multi-process HAProxy statistics using Lua. ...

How to install CouchDB

Install CouchDB on Debian Buster. ...

How to reset RabbitMQ node configuration

Reset RabbitMQ node configuration. ...

How to generate password hash for CouchDB administrator

Generate password hash for CouchDB administrator. ...

How to display RabbitMQ version

Display RabbitMQ/Erlang version using essential utilities. ...

How to use OpenResty to perform health checks

Use OpenResty to perform health checks in your cloud environment as it incorporates Nginx, Lua and comes with batteries included. ...

How to alter configuration for specific yum repository

Alter configuration for specific yum repository. ...

How to prevent systemd service start operation from timing out

Specify systemd startup timeout option to prevent service start operation from timing out. ...

How to perform basic Elasticsearch operations

Perform basic Elasticsearch 7.x operations. ...

How to install Elasticsearch

Install Elasticsearch 7.x on Debian Buster. ...

How to protect Netdata instance using basic access authentication

Protect Netdata using basic access authentication. ...

How to disable yum repository

Disable specific yum repository to prevent particular packages from installation or update. ...

How to use HAProxy stats socket

Use HAProxy stats socket to determine current application status. ...

How to access OneDrive on Debian

Access your files stored in OneDrive using rclone command-line program to sync files and directories to and from cloud storage and FUSE Filesystem in Userspace filesystem. ...

How to suppress the message of the day

Suppress message of the day for specific or multiple users. ...

How to manage and display system news

Manage and display system news using a simple but effective utility. ...

How to display LWN news using message of the day framework

Display LWN news using the message of the day framework. ...

How to protect system against accidental shutdown

Protect the operating system against accidental shutdown or reboot. ...

How to create VLAN interface using the ip utility

I have already described how to create VLAN interface, but things have changed over time, so I decided to update the know-how. ...

How to install RabbitMQ message broker

Install RabbitMQ message broker to queue and exchange messages. ...

How to parse Debian package information

Use to drctl-tools to parse Debian package information using the Debian control file format (the dctrl format). ...

How to automatically add Jira issue ID to the commit message

Use branch name to automatically add Jira issue ID to the commit message. ...

November 25, 2019 · milosz · Git

How to use regex to dynamically define server name

Use regex to define server names when using Nginx to dynamically serve or route traffic. ...

November 20, 2019 · milosz · nginx

How to store the contents of every tmux pane

Store contents of every tmux pane using a shell script. ...

How to store the contents of tmux pane

Store contents of tmux pane to a file to keep the history or inspect recently executed commands. ...

How to solve pipeline mysteries

I have already described how to inspect a pipeline, but today I will show you how to write a shell script that will help you reconstruct a whole pipeline when all you got is a process ID that is part of the pipeline. ...

How to inspect a pipeline

A pipeline is a sequence of multiple commands separated by the control operators. It is easy to understand as long as you see the whole picture, but I will show you how to inspect it when you have a single process ID. ...

How to distinguish standard error from regular output

Use bash redirection and process substitution to programmatically distinguish standard error from regular output. ...

How to strace PHP-FPM processes

Isolate the problem and strace multiple PHP-FPM (FastCGI Process Manager for PHP) processes to identify the culprit. ...

How to stop search engines from crawling website using nginx

Stop search engines from crawling website using simple Nginx location directive to provide robots.txt file. ...

October 7, 2019 · milosz · nginx

How to mount NFS share using systemd

This is an extension to an older blog post on how to mount WebDAV share using systemd as this proved to be a very reliable method that is easy to mark as a dependency for other services. ...

How to modify system identification message

Modify system identification message that is printed before the login prompt. ...

Which Gitea ARM build install on Raspberry Pi

Gitea currently does not provide packages for ARMv7, which was commonly used for Raspberry Pi 3. This is not a problem as software compiled for specific ARM instructions set should work on more recent architectures thanks to backward compatibility with earlier ARM processors. ...

How to match certificate and its intermediate counterpart

Match certificate and its intermediate counterpart by using X.509 key identifier extension. ...

How to display and verify certificate chain for specific domain

Use openssl utility to display and verify the certificate chain for a specific domain. ...

How to generate RabbitMQ password hash

Use a simple Go application to generate RabbitMQ password hash. ...

How to send output to multiple commands

Send output to multiple commands using tee utility and bash process substitution. ...

How to specify the same option multiple times using Bash

Write a simple Bash shell script that will allow you to specify the same option multiple times or provide multiple arguments to a single option. ...

How to count TCP connections

Use netstat, ss or files inside proc filesystem to count TCP connections. ...

How to generate sequence of numbers

Generate and print sequences of numbers to perform specific operations using command-line or shell script. ...

How to determine how long specified remote server or device was offline

Create a shell script to determine how long a specified remote server or device was offline. It is not designed to substitute monitoring solutions but to determine how long it will take to reboot the server or device. It is using convert seconds to human readable time code to display results. ...

How to capture column from command output and convert it to a row

Capture column from command output and convert it to a row to pass it further. ...

How to disable Google Accounts daemon

Enforcing your own security policy that defines users, SSH keys, and sudo configuration inside custom templates based on official images in Google Cloud requires that you disable Google Accounts service, so it won’t get in the way. ...

How to pretty print size in bytes using AWK

Pretty print size in bytes using AWK. ...

How to avoid the two most common caveats when using read command

These are easy mistakes to make as the bash builtin read command will terminate with the error exit code on the end-of-file condition and use Internal Field Separator to split the line into words. It is kind of tricky, but it is worth knowing how to deal with such problems. ...

How to display memory used by processes in human readable form

Display memory used by processes in human-readable form using ps and awk utilities. ...

How to display user details using NordVPN API

Today, I will show you how to get and display user details using a shell script. This work is based on a Python-based solution by David Green and located at bitbucket/nordapi. ...

How to remotely execute shell function

Sometimes it is very convenient to define shell function and execute it remotely. ...

How to perform dictionary attack on LUKS passphrase

Perform a dictionary attack on the forgotten LUKS passphrase to access the encrypted device. ...

How to compare two files byte by byte

Compare two files byte by byte using cmp file comparison utility. ...

How to inspect Redis internals using UNIX socket and Python script

Inspect Redis internals using UNIX socket and Python script without external dependencies. ...

How to instantly add known_hosts entries for host and its IP address

Use simple shell function to instantly create known_hosts entries for specified host, including its IP address and remove outdated public host keys. ...

How to monitor PHP-FPM pool

Monitor PHP-FPM (FastCGI Process Manager) pool using curl utility, cgi-fcgi application or slightly modified Python script that was used to display PHP-FPM pool information. ...

How to display PHP-FPM pool information using UNIX socket and Python script

Display PHP-FPM (FastCGI Process Manager) pool information using UNIX socket and Python script. I thought it would be easy to write a simple FCGI client. Apparently not, but it was an exciting and rewarding experience. ...

How to determine maximum LUKS passphrase length

Determine maximum LUKS key file size or maximum interactive passphrase length. ...

How to move files based on specific time criteria

Use find a utility to move files based on specific time criteria. ...

How to display TLS server extensions

Use openssl command-line utility to display TLS server extensions. ...

How to use public NordVPN API

In a blog post a month ago, I described how to use a terminal to display servers recommended by NordVPN, but the same result can be achieved by using public API service. It is not officially documented, so let’s play with it. ...

How to build package using directory structure and custom metadata

The simplest possible way to create a Debian package is to use defined package metadata and prepared target directory structure. ...

How to use terminal to display servers recommended by NordVPN

I have already described a simple way to manually configure Network Manager and automatically import NordVPN servers, so today, I will explain how to pretty print servers recommended by NordVPN using terminal instead of web-browser. ...

How to convert seconds to human readable time

Create a shell script to convert seconds to human-readable time. I have reused part of an old shell script used to pretty-print system uptime to built it, as this code proved to be useful on several occasions. ...

How to free disk space from deleted but still referenced file

Very rarely and often by mistake, you can end up with a deleted file that is still used by some process, which is likely writing to it, so the used space cannot be freed. ...

How to install Prosody an Open source and modern XMPP communication server

Install Prosody, an Open-source and modern XMPP communication server. ...

How to schedule one-time task

Schedule a one-time task at a specific time or below defined system load using at utility. ...

How to display output of multiple commands using columns

Execute paste utility to merge lines using tab character as a delimiter, expand to convert tabs to spaces, and column to format input into multiple columns. ...

How to display processes using the most CPU or memory

Display processes using the most CPU or memory using nothing more than basic Linux utilities. ...

How to count separate line entries inside a pipe

Use a shell script to count separate line entries inside a pipe to see how many entries got filtered out. It can be useful in some scenarios, especially for testing. ...

How to aggregate weekly data to create custom statistics

Recently, I have parsed logs of several applications to generate custom weekly reports. It was a fascinating exercise. ...

How to make iptables configuration persistent

Make iptables configuration persistent using essential system utilities or a designated boot-time loader. ...

How to download in advance the public key used to sign repository signatures

There are those rare situations where you do not know the public key required to verify repository signatures but want to add a repository and a public key used to sign it. Hopefully, there is an easy answer to that question. ...

How to remove useless localizations

Install and configure localepurge package, which provides a fancy shell script to recover disk space used by useless localizations. ...

How to configure command-line tab completion for known SSH hosts

Configure and enable command-line tab completion for known SSH hosts to ease day-to-day operations. You do need to configure or enable this on Debian-based distributions, but it is good to know how to do this as you will never know when it will come in handy. This article is an extension of adding the SSH menu to the Unity launcher blog post. ...

How to perform different operations depending on the shell script name

This technique is widespread. To be honest, it is more common than I initially thought, so I will show you how to create a single shell script that will display, create or destroy a temporary file system depending on the name used to execute it. ...

How to download public key used to verify GnuPG signature for the repository

Configuring and using additional repositories requires APT public key management to validate the Release file and downloaded packages. ...

How to find a symbolic link by the target name

Find a symbolic link by the target name. It sounds simple and it definitely is. ...

How to calculate how fast data is copied to the specified directory

Determine how long it would take to copy data between directories. ...

How to verify file integrity using GnuPG signature

Verify file integrity using the GnuPG signature without touching your local GnuPG configuration. ...

How to create shell script for a cron job with hidden debug information

Create a shell script for a cron job with hidden debug information shown only when executed inside the terminal. ...

How to execute logrotate every hour

Logrotate does not support hourly schedule, but this is an easy task to accomplish. ...

How to locate directories that contain one or multiple files with particular content

Use find and grep commands to search for directories that contain one or multiple files with specific content. ...

How to display package dependencies

Display dependencies to inspect which packages are required for a given application. ...

How to disable USB device

Whitelist or render inoperative any USB device to secure your personal belongings. ...

How to create iptables firewall using custom chains

Create an iptables firewall using custom chains that will be used to control incoming and outgoing traffic. ...

How to detect and log changes in the list of mounted filesystems

Detect and log changes in the list of mounted filesystems (/proc/self/mountinfo file). ...

How to determine process execution time

Use GNU Bourne-Again SHell builtin or standalone time command to determine process execution time. ...

How to execute additional commands during system startup using cron

Use cron service to execute additional commands as the specified user using cron during system startup. ...

How to integrate lightline status line plugin for Vim with Solarized theme

I am using the lightline status line with the Solarized color scheme inside Vim text editor. ...

How to serve files from memory with a fallback using nginx

Serve files from memory with a fallback using the Nginx HTTP server. ...

How to create simplest possible iptables firewall

Create the simplest possible iptables firewall with quite relaxed rules that will allow all outgoing traffic, incoming ICMP packets, and ssh connections on the eth0 interface. ...

How to use variable to choose HAProxy backend

Define and use a variable to dynamically choose HAProxy backend depending on the URL parameter, HTTP header field, and cookie value. ...

How to execute older version of free utility

I have described the differences between the old and new free output format, so now I want to mention how to execute the former free version on Debian Stretch using LD_LIBRARY_PATH environment variable to temporarily substitute a different library for this particular execution. ...

How to block particular IP addresses on HAProxy

Block particular IP addresses on HAProxy load balancer using simple Access Control List. ...

How to display dependencies for deb package

Use dpkg to pretty print package dependencies. ...

How to locally check SSL certificate

Check locally stored SSL certificate using essential utilities like openssl and curl. This knowledge is especially useful when you want to prepare an SSL certificate for a load balancer. ...

How to generate and decode CSR

Create a certificate signing request and use it to generate an SSL certificate. I strongly suggest reading my two earlier blog posts about self-signed SSL certificates and private keys as these contain useful information. I will describe three different ways to generate a certificate signing request. ...

How to parse free output to display available memory

The free utility is used to display the amount of free and used memory in the system. Debian Stretch provides an upgraded package. Output format has changed, and available memory is calculated using a different method, so let’s see what we can do with these modifications at this moment. ...

How to install and configure Pi-hole

Install Pi-hole, a network-wide ad blocking on your own Linux hardware. I have used it on Debian Stretch, but then moved to a small Raspberry Pi, which now acts as DNS and DHCP server. ...

How to configure HTTP/2 in http mode on HAProxy and fix bad request problem

Enable HTTP/2 on HAProxy 1.8 and temporarily fix the bad request problem with the Nginx backend using FastCGI/uWSGI. ...

How to access Microsoft SQL Server instance when you are locked out

You can still connect to the Microsoft SQL Server 2014 as a member of the sysadmin server role using single-user mode when you are locked out of the database. ...

How to query APT configuration

Query APT configuration to inspect specific options or create universal Debian utilities. ...

How to verify IPv4 address

There are many different ways to verify IPv4 address inside a shell script, but many of these are complicated or incomplete. I will describe a simple and verbose way to check IPv4 address using ipcalc utility. ...

How to manage known_hosts file using shell script

I am using a simple shell script to manage OpenSSL known_hosts file as it requires many small updates due to constantly changing host keys on a dynamic virtual server. ...

How to automatically control APT cache

Keeping an eye on a constantly changing APT cache can be quite tedious, so automate this task and free up your time to focus on other projects. ...

How to clear the APT cache

Clear the APT cache to reclaim disk space used by the downloaded packages. ...

How to disable the APT cache

Disable APT cache to conserve disk space on a small Debian based embedded system or a custom-built live USB system that can be easily booted. ...

How to execute CGI scripts using fcgiwrap

I am an enthusiast of the uWSGI project. You are still not limited to it as you can use fcgiwrap, a very lightweight and straightforward FastCGI wrapper for CGI scripts that do not require additional configuration. ...

How to keep track of network latency

Keep track of network latency using SmokePing, uWSGI application server, and Nginx HTTP server. SmokePing supports many configurable probes, alerting, and live charts accessible through a web browser. It was created by Tobi Oetiker, which is known for RRDtool an Open Source data logging and graphing system for time series data. ...

How to display real destination URL

I am using curl to verify redirects and display real destination URL, and you should try it too. ...

How to display HTTP response code

Use curl utility to verify the HTTP response code for the given URL. ...

How to install packages using repository snapshot

It is rarely mentioned, but you can use repository snapshots to download and install old and obsolete packages on already unsupported or even current Debian distributions. ...

How to display message provided from standard input or as a parameter

Today, I will create a simple proof of concept shell script to display the message provided from standard input or parameter. It could be used as a template to write shell scripts that can be executed in a pipe or as a standalone application. ...

How to display network connections using lsof and GNU awk

Two years ago, I described a simple way to display established TCP connections using ss command. Today I will use lsof and gawk to pretty print network connections. ...

How to use old network device naming convention

It is a matter of personal preference whether you use current or former network device naming convention. I am more accustomed to the latter and will configure the operating system to retain the old behavior. ...

How to copy standard output and catch error code in the meantime

It is widespread to display and store command output using tee utility, but taking full advantage of it requires applying a slightly different error catching strategy. ...

How to use a parameter or standard input inside the shell script

Create a simple shell script that will read user message as a parameter or directly from standard input when used in the pipeline. ...

How to stop referral spam using Nginx

Today, I will show you how to stop referral spam using simple nginx directives to return 403 Forbidden HTTP status code after encountering troublesome referer hostnames. ...

How to display days till certificate expiration

Use openssl command-line utility to calculate and display days till the certificate expiration. ...

How to list configured APT repositories

List configured APT data sources for binary packages using apt-cache utility. ...

How to display certificate issuer and dates

Use openssl command-line utility to display common name, certificate issuer, alternative names, start/end dates. ...

How to display process environment

Today, I will describe how to display environment variables associated with the running process. ...

How to get the number of connections broken down by a host

Display established connections broken down by a host. ...

How to display processes using swap space

Identify and print processes using swap space to get a better understanding of the Linux operating system. ...

How to perform real-time performance monitoring

If you have ever wondered how to perform real-time performance monitoring on a number of virtual hosts scattered across multiple locations, then install and use netdata application. ...

How to verify package version in shell script

There are circumstances when you want to ensure a particular package version during the setup process. I will show you a simple method to verify the package version suitable for sourcing into a shell script. ...

How to determine when process was started

There are at least several ways to determine when the process was started to help you investigate and trace potential issues. I will briefly introduce four different methods to choose the most useful one. ...

How to get name of the source package

There are many applications that share the same source package, so I will show three different ways to print the name of the source package. ...

How to determine when the last time package index files were updated

Knowing how to determine when the last time package index files were updated can be beneficial when you least expect it. It is not something used every day but can be used to monitor or verify when apt-get update command was executed. ...

How to jump between defined set of locations

I am constantly moving between a fixed list of several directories daily. Using cd can be tedious at times, so I defined a shell function to quickly jump between a defined set of directories. ...

How to create basic tmux setup

I am using tmux terminal multiplexer daily. It is an irreplaceable utility that eases everyday tasks as it lets you switch between multiple applications in one terminal. I will briefly describe my personal configuration setup. ...

How to automatically login user at the console

I have already described a straightforward way to automatically login user at the console without touching the graphical user interface using Debian Wheezy, so today I will post an update for Debian Jessie as the whole process has changed considerably. ...

How to disable touchpad using shortcut

I have already described how to disable the touchpad when an external mouse is connected using the udev device manager, but today I want to share a simple shell script that I am using on Dell XPS 13 to disable/enable the touchpad using a single keyboard shortcut. ...

How to install and configure DokuWiki instance

Dokuwiki is the best Open Source project I have ever used, so I have prepared a simple step-by-step guide to help you get started. It is relatively brief and concise as most of the code was already described in other blog posts found on this website. ...

How to check for command inside shell script

Today, I will illustrate a simple way to check for specific command inside a shell script, which is quite simple as it uses only shell built-in command utility. ...

How to check for package inside shell script

Today, I want to briefly describe a simple way to check for a specific package inside a shell script. ...

How to explain umask

I wrote a simple application to explain the current UMASK value. It was a while ago, but I want to share it with you as it is quite a useful utility. ...

How to reload wifi module on resume

Once in a while, I have a problem with Intel Corporation Dual Band Wireless-AC 7265 on Dell XPS 13 during the resume process as it just stops working and won’t connect to any network. The solution is to simply reload the kernel module. ...

How to search through manual pages

It was almost three years ago when I wrote about manual pages. Moving forward, I want to share a simple and useful shell script to search through manual pages. ...

How to configure AWStats web-interface

I will show you how to configure the AWStats web-interface using the uWSGI application server and Nginx HTTP server, which is a very simple and straightforward process. ...

How to fix Bluetooth sound synchronization

I have experienced a lot of trouble with Bluetooth sound synchronization. Most of the time, this issue was especially evident while watching movies. Fortunately, the solution is within easy reach. ...

How to automatically import NordVPN servers

A week ago, I illustrated a simple way to connect to the NordVPN server using Network Manager. Today I will describe a more advanced solution to automatically import NordVPN configuration using a shell script. ...

How to inspect command before execution

It is nothing fancy, but there are situations where it is beneficial to know how to identify and inspect command before execution. ...

How to get names of distinct Debian releases

It is easy to get names of distinct Debian releases as you can always examine these on the Debian Releases web page. I will do something more interesting and demonstrate how to do that using a simple shell script. ...

How to use recent version of Firefox in Debian Jessie

I was recently pointed out by Piotr Gabryjeluk that Iceweasel name was dropped (see Debian Bug report #815006). This caused a major inconsistency in the previous blog post. This is an updated version for Debian Jessie ...

How to reload PostgreSQL configuration

Today, I will describe how to cause PostgreSQL clusters to reload their configuration files using four simple methods. ...

How to install and configure private Seafile cloud storage server

Since the beginning of this year, I have started using Seafile, and I absolutely love it as it offers simple data organization using libraries and reliable file synchronization between multiple devices with built-in encryption. Check for yourself as it is undoubtedly worth it. ...

How to perform PostgreSQL point-in-time recovery

This blog post is an update to the earlier PostgreSQL entries in which I will show you how to use continuous Write Ahead Log archiving to take advantage of the point-in-time recovery. ...

How to use The GNU Privacy Guard

The GNU Privacy Guard is an essential application when you need to ensure the confidentiality and origin of the information, so it helps to protect your privacy and the people you communicate with. ...

How to use classic Gnome shell instead of Unity desktop

There are cases where I prefer to install and use Gnome fallback mode (Gnome Flashback in recent system versions) instead of full-blown Unity desktop. I will give you simple instructions on how to change the default session manager. ...

How to parse and process Linux Software RAID events

It is an interesting thing to know how to parse and process Linux Software RAID events. It is also beneficial as you can automatically take appropriate action immediately after a certain event occurs. ...

How to perform action after SQL statement

Sometimes I want to monitor and log particular PostgreSQL statements or execute other kinds of external action. I am using the notify mechanism and slightly modified sample application found in the database documentation to achieve this. ...

How to use recent version of Iceweasel in Debian Jessie

Do you want to use the latest version of Iceweasel, also known as Firefox? Then add the repository provided by the Debian Mozilla team and choose between release, beta and aurora version. This blog post is obsolete. Please read How to use a recent version of Firefox in Debian Jessie instead. ...

How to add Sublime Text to Unity launcher

I am using Sublime Text to write this blog post. It is a great piece of software. However, it does not contain a desktop file, so you need to create it separately. ...

How to add SSH menu to Unity launcher

I am currently using the latest Ubuntu on Dell XPS 13. It works great, and using it is a real pleasure. However, after a while, I got an idea to add the SSH menu to the Unity launcher for enhanced usability. ...

August 31, 2015 · milosz · Ubuntu

How to replace failed software RAID device

I had an unexpected incident last week as one of the hard disks in my server failed. This device was a part of a software RAID mirror, which created an opportunity to describe the whole process. ...

How to enforce read-only mode on every connected USB storage device

Today, I will show you how to put every connected USB storage device in read-only mode using udev dynamic device management, blockdev utility, and systemd service unit configuration. ...

How to copy answers to the configuration questions for Debian packages

Human memory is sometimes unreliable, so it is not always possible to answer in the same way to the configuration questions. Fortunately, this process can be automated using debconf utilities. ...

How to manage system services on Debian Jessie

Debian Jessie is using systemd as the default system and service manager. I will not argue about it, but instead, I will briefly introduce the whole thing. ...

How to pretty-print disk space used by PostgreSQL databases

I wrote a simple shell script to pretty-print disk space used by PostgreSQL databases while examining database object size functions. You can benefit from this too by inspecting used SQL statements. ...

How to terminate active ssh sessions

Several months ago I have shortly described how to close a non-responsive ssh session, which comes in handy at times. Today I will describe how to close every active ssh session by inspecting existing pseudoterminals. ...

How to pretty-print system uptime

It is easy to use uptime command, but custom shell script is definitely a more interesting solution as it provides more detailed information. ...

How to verify installed packages

I have unexpectedly experienced an issue with a couple of broken packages, which was easily solved using debsums utility. ...

How to automatically logout user from the login shell after period of inactivity

I want to automatically log out the user from the login shell after a defined period of inactivity but leave X Window Terminals untouched. This will allow me to enhance security slightly, as I will not accidentally leave the superuser session running for a long time. ...

How to find orphaned files

It is easy to overlook orphaned files without an assigned existing owner or group after moving large amounts of data. Fortunately, it is easy to spot these files using the find utility. ...

How to store last command from history

I often want to save a recently executed command to the personal log file for further reference, so let’s do it. ...

How to check the progress of dd using proc filesystem

On Sunday 29th April 2012, I have described How to check dd’s progress using User-defined signal 1. Today, I will extend this topic further using the proc filesystem. ...

How to quickly and securely search for files

Using find command is not always the fastest way to search for specific files. The better method is to use mlocate utility, which uses its own file database and provides only user-accessible results. ...

How to inspect PostgreSQL queries

Sometimes I want to inspect and verify queries made by an application or hunt a bug that involves more complex queries. The essential part of this process requires altering PostgreSQL server configuration to log SQL statements. ...

How to locate scripts in the PATH

Simple shell script that will iterate through the directories in the PATH variable and print only files identified as scripts. ...

How to check external IP address

I am constantly on the move, so sometimes I need to quickly verify my external IP address, as I do not want to accidentally block myself on some kind of firewall. ...

How to password protect GRUB entries

I always asked myself how to password protect GRUB entries on an encrypted notebook to lock down the boot loader and protect it from unauthorized access. ...

How to check file metadata using shell script

It is well described how to verify file existence or type, but there is much more information that can be easily verified inside shell script using nothing more than simple stat command. ...

How to create persistent reverse SSH tunnel

Sometimes I want to access a private server at home from a different network while being on the go. The easiest way to do this is to use autossh utility to create a secure and persistent reverse SSH tunnel to the publicly available server. ...

How to use recent version of Iceweasel in Debian Wheezy

Do you want to use the latest version of Iceweasel, also known as Firefox? Then add the repository provided by the Debian Mozilla team and choose between release, beta and aurora version. ...

How to check package version

Sometimes I need to check the installed package version, compare it with the available version, or verify that the correct version is already installed. I will show you how to quickly perform these checks. ...

How to enable VPN connections inside Network Manager

Default Debian installation does not include VPN support inside the Network Manager applet. The reason behind this decision is probably the variety of available solutions. ...

i915 and "Hangcheck timer elapsed" error

Since Debian Jessie installation, I have encountered Hangcheck timer elapsed error. It is a really nasty bug as the only way to escape frozen X Window System is to reboot the whole operating system. ...

How to create simple bar charts in terminal using awk

Today, I tried to visualize how many processes each user is running using a bar chart. The catch is that I want to see results in a plain terminal, which makes things more interesting. ...

How to verify copy process

Yesterday, I left a long-running copy process between two external USB hard-drives. I did not want to assume anything, so I created a simple shell script to ensure that the whole process went smoothly. ...

How to handle Bash history

I have already written a blog post about useful Bourne Again SHell key sequences, so today, I will touch on another important aspect of the daily routine – the history. ...

How to monitor TigerVNC service using Monit

Recently, I was searching for an easy to manage VNC service to use it at home. After a short while of consideration, I decided to install TigerVNC and manage it using Monit. ...

How to read interface statistics on Cisco Catalyst switch using SNMP protocol

Today, I will show you how to create a simple shell script to read and print interface statistics on the Cisco Catalyst switch using the SNMP protocol. ...

How to terminate PostgreSQL sessions

Recently, I have encountered an interesting issue, as I could not perform specific database operations due to unwanted and active sessions using the database. Thus, I will briefly note the solution for further reference. ...

Kolab – SSL certificate authentication (web-based interface)

This weekend, I have spent some time investigating SSL certificate-based authentication and implementing it in Kolab web-based user interface. This topic is fascinating but definitely too broad to be briefly described in a single blog post, so do not look at it as a complete solution, but treat it only as a proof of concept. ...

Kolab 3.1.5, Debian 7.5 and issue during setup process

After a longer period of time, I have decided to install Kolab and use it as a personal information manager. The installation process went as expected until the setup process tried to install the Roundcube database and failed miserably. ...

Amazing Emacs org-mode

I have discovered org-mode in the last year but have been using it for the last two months with increasing enthusiasm and commitment. I will be honest and tell you that it is the sole reason to learn and use Emacs on daily basics. ...

How to count local user accounts

If you are wondering how to count only local users ignoring system accounts, I will give you a concise and straight answer. ...

How to colorize text in terminal

Seven days ago I have published a shell script to highlight text in the terminal using sed or ssed. Today I want to extend the idea and colorize specified strings or simple regular expressions using just bash, getopts and ssed respectively. ...

How to highlight text in terminal

I have been working on a simple shell script to highlight text in the terminal for the last hour. At first, I looked at it from the wrong angle, but after a short break, I finally realized the simplest possible solution. ...

How to open Firefox bookmarks from OpenBox menu

I have recently switched to OpenBox, so today, I will use dynamic menus to integrate Firefox bookmarks with an existing OpenBox menu. ...

How to redirect command output using sudo

You have probably already noticed my favorite way to overcome the sudo redirection issue, but if you haven’t, then I will write it down here for further reference. ...

How to set up Raspberry Pi as a tiny NAS server

Today I will shortly describe how to set up Raspberry Pi as a tiny NAS server. I am using one at home daily, and it is a handy appliance. ...

How to deal with dmesg timestamps

By default dmesg command print kernel ring buffer using the timestamp for each logged message. It is easy to change this behavior and display date/time in a human-readable form using just one additional parameter. Still, sometimes it is not supported, so I will shortly touch upon this topic. ...

How to determine whether the processor supports 64-bit instruction set

If you ever wondered how to determine whether the processor is 64-bit capable, then I have a simple and straight answer for you. ...

How to configure software RAID1 during installation process

Recently I needed to setup software RAID1 during Debian installation process. As it turned out, this process was simpler then I initially expected. I will shortly describe it here using screen-shots captured during initial tests. ...

How to check last mount time of the ext2/ext3/ext4 filesystem

A couple of days ago, I was asked how to check the last mount time of the ext2/ext3/ext4 filesystem. The solution is straightforward as it does not require anything more then tune2fs utility. ...

How to display available updates

It is straightforward to display available updates using an application with a graphical user interface, but not so obvious to do it by using shell commands only. I will shed some useful light on the subject so we could both benefit from it. ...

Debian – How to quickly disable IPv6

I am playing with Linux Virtual Servers in the Linode Cloud for the last several days and a couple of times wanted to disable IPv6 for testing purposes. ...

How to open manual page at the specific page section

After writing the previous blog entry, I started to think about how to specify page section when opening the manual page. It is a simple but quite interesting issue, so I quickly got curious and wrote this post to describe a straight solution. Just to be clear – I need to mention that I am not writing about section numbers describing distinct subject areas but just page sections, such as NAME, SYNOPSIS, DESCRIPTION, AUTHORS, and so on. ...

How to read total CPU usage of the group of processes

I was wondering how to read the total CPU usage of the group of processes. Then I came with a straightforward solution using top and awk commands. ...

How to re-read partition table

Re-read partition table without machine reboot using partprobe utility which is a part of parted package. ...

Simple shell script to backup selected directories

A couple of months ago, I published a short script to backup MySQL databases. Today I created a simple shell script to backup selected directories. ...

How to change the MAC address of an Ethernet interface

Change the MAC address of an Ethernet interface and make this change permanent. I will briefly explain how to do this using standard commands and one particularly useful tool MAC Changer. ...

How to automatically set up external monitor

Recently I was wondering how to automatically set up an external monitor without using desktop utilities as I don’t like to configure it each time. This question provided me a lot of fun as it opens a couple of interesting possibilities. ...

How to monitor battery capacity

Recently battery in my notebook started to behave erratically. It will charge only to 70-80% of its maximum capacity. I suspect that it is probably slowly dying, so I will have to replace it soon, but at first, I will look at several utilities to monitor battery capacity. ...

Simple shell script to backup MySQL databases

Simple shell script to backup MySQL databases. ...

How to change RRD data source name

To change the data source name, you need to check its current value and then issue single rrdtool command. ...

How to get disk UUID

I recently needed to know the UUID (universally unique identifier) of my bootable USB root partition. It is a better way to distinguish storage devices because device names can change depending on the connection order. ...

Boot to RAM notes

This post contains notes on this topic in the form of a concise guide. ...

How to check the progress of the dd process

Check the progress of the dd process. ...

Ubuntu and recent problems related to PHP

Recently I run into small problems related to PHP. Problem A – sqlite.so The first one was a PHP warning: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP tried to load sqlite.so from /etc/php5/conf.d/sqlite.ini (php5-sqlite package). $ dpkg -L php5-sqlite /. /etc /etc/php5 /etc/php5/conf.d /etc/php5/conf.d/sqlite3.ini /etc/php5/conf.d/pdo_sqlite.ini /etc/php5/conf.d/sqlite.ini /usr /usr/share /usr/share/doc /usr/lib /usr/lib/php5 /usr/lib/php5/20090626 /usr/lib/php5/20090626/pdo_sqlite....

How to check established TCP connections

Display established TCP connections inside the terminal. ...

How to do some work in each active jail (FreeBSD7)

Execute a set of commands inside each active jail. ...

ODIN – Free Disk Imager

From time to time I need to backup/restore OS on the CF card using Windows machine. ...

Scripting SPS switches

Managing SPS switches could be real fun if you use expect to automate such tasks. ...

How to get rid of spaces in filenames

Get rid of spaces in file/directory names. ...

Using KDE notification area within a shell script

Using KDE notification area within a shell script gives a lot of useful possibilities as you can easily display feedback from running services, other scripts, log analyzers. ...