Linux: Compiling a Bash Script into Binary

Bash shell scripts in Linux are used in plaintext. Obfuscation allows you to hide a Bash script’s source code by compiling it into a binary. On Linux, you can use the shc tool to compile bash scripts. This tool can convert bash script code into C language and compile it. The output will be a binary file that can be run on almost any other Linux machine.

Continue reading “Linux: Compiling a Bash Script into Binary”

Fix: apt-get – there is no public key available

An error may occur when updating the apt deb package manager cache on Linux (Ubuntu or Debian distros):

$ apt-get update

W: There is no public key available for the following key IDs: 467B942D3A79BD29
W: GPG error: https://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29

Continue reading “Fix: apt-get – there is no public key available”

Configure Local DNS Caching on Linux

On most modern Linux distros, you can enable the local caching of DNS queries by using the built-in systemd-resolved service. In this article, we will take a look at how to speed up the resolution of DNS queries by using systemd-resolved local client caching on Debian and Ubuntu. This allows you to reduce DNS resolution delays if you have an unstable network connection, when DNSSEC is enabled, and on hosts that make a large number of DNS queries (for example, mail servers).

Continue reading “Configure Local DNS Caching on Linux”

Configure Network Settings on Ubuntu (Network Manager, Systemd and Netplan)

Modern versions of Ubuntu offer many different ways to configure network settings, and it’s easy to get confused. In this article, we will have a look at how to configure network settings in Ubuntu using Network Manager, Systemd Networkd, Netplan, and the static configuration file /etc/network/interfaces (legacy way).
Continue reading “Configure Network Settings on Ubuntu (Network Manager, Systemd and Netplan)”

How to Add and Change System Locale on Ubuntu and Debian

Linux localesettings determine the current operating system regional settings used in the terminal and GUI (such as date and time format, currency symbols, available character sets, etc.). This article looks at how to check or set locale settings on Linux distros (Ubuntu, Debian, Mint).

Continue reading “How to Add and Change System Locale on Ubuntu and Debian”