Linux & Unix

Optimize MySQL Performance with Mysqltuner

This short tutorial describes the steps to optimize the performance of a MySQL database with the mysqltuner script. This tool can be used for MySQL and MariaDB. Install mysqltuner The mysqltuner High-Performance MySQL Tuning Script is available as a package on Debian 10 and Ubuntu 20.04, install it with at: sudo apt install mysqltuner For …

Optimize MySQL Performance with Mysqltuner Read More »

How to list installed packages on Debian 1

How to list installed packages on Debian

This short guide shows you how to get a list of all installed Packages on Debian Linux. Packages on Debian get installed with the apt package installer. We will use the dpkg command, which is part of the apt toolset, to query the installed packages database. Get all installed Debian packages dpkg –get-selections As you …

How to list installed packages on Debian Read More »

How to add PHP support for jailed SSH users in ISPConfig 3 2

How to add PHP support for jailed SSH users in ISPConfig 3

Jailkit is an easy-to-use tool to create and maintain jail environments for shell users on Linux. In this guide, I will show you how to move PHP and its dependencies into the jail so that the jailed user can execute PHP scripts inside the jail on an ISPConfig server. Edit the jailkit .ini file and …

How to add PHP support for jailed SSH users in ISPConfig 3 Read More »

How to clear Bash history on Linux

The bash history is a log file that contains all commands that the user¬†executed on the Linux shell. When you use the “arrow up” key on our keyboard, then Bash will look up the previous command from that file and display it on the screen, ready to be executed again. Bash history file location The …

How to clear Bash history on Linux Read More »

How to enable auto updates in Ubuntu 20.04 3

How to enable auto updates in Ubuntu 20.04

It is important to keep your Linux server up to date with security updates. Linux distributions like Ubuntu and Debian release updates on a daily basis, so keeping the system up-to-date can become a tedious task. Fortunately, there is an option to install security updates automatically. Here are the steps to enable automatic security updates …

How to enable auto updates in Ubuntu 20.04 Read More »

Redirect a subdomain in Apache and keep the URL in the address bar

This tutorial shows you how to use redirect rules in the Apache web server. If you want to redirect a subdomain like sub.domain.tld into a subdirectory of the website and keep the original URL in the browser location bar, you may use the following apache directive. RewriteEngine on RewriteCond %{HTTP_HOST} ^sub.domain.tld [NC] RewriteRule ^/(.*)$ /sub/$1 …

Redirect a subdomain in Apache and keep the URL in the address bar Read More »

How to convert filenames or text to lowercase on the Linux command line

There is no simple ‘tolower’ command on the bash, but you can convert uppercase characters to lowercase with a little shell script. The script uses the tr command internally for converting the chars. Create a shell script with the name ‘tolower’ that converts all text that is given as a command-line argument to lower case: …

How to convert filenames or text to lowercase on the Linux command line Read More »

Redirect domains without www (e.g. domain.com) to www.domain.com with apache rewrite rules

If all your visitors shall access your website with a URL like www.domain.com and not without www, use the following apache rewrite rule for redirecting them. RewriteEngine On RewriteCond %{HTTP_HOST} !^www RewriteRule (.*) http://www.%{HTTP_HOST}$1 [L,R] The apache rewrite rule can be added in a .htaccess file in the website root directory or if you use …

Redirect domains without www (e.g. domain.com) to www.domain.com with apache rewrite rules Read More »

How to Backup/Clear/Restore a SpamAssassin Bayes Database

Sometimes you might have to work with the Spamassin Bayes Token database. This is the database that is used by the SpamAssassin Self Learning (Bayesian) Classifier to store the ham and spam tokens. This tutorial will show you how to make a backup of that database. E.g. when you want to move it to a …

How to Backup/Clear/Restore a SpamAssassin Bayes Database Read More »

How to easily split screen space to fit two windows in Ubuntu 16.04LTS 4

How to easily split screen space to fit two windows in Ubuntu 16.04LTS

There are times when the work you’re doing involves switching between two applications. For example, a common use-case is reading commands/instructions from a Web page opened in Web browser and trying them on the command line terminal. I am sure many of you are used to the Alt+Tab way of switching between application windows. However, …

How to easily split screen space to fit two windows in Ubuntu 16.04LTS Read More »