If you want to display details of an SSL certificate that is returned by a website from the Linux commandline, you can use this command. 1. Install required packages In order to use the command below, the “openssl” package is required. You can install this package with this command: Or with yum: 2. Execute command-line… Continue reading Linux display SSL cert of website from command line
Category: UNIX Shell
Linux how to find installed package name of Java and remove it
The tip below applies to systems that use the “dnf” package manager, e.g. RedHat 8 and AlmaLinux. 1. Find installed package based on wildcard name You can use the following command to search all of the installed packages based on a wildcard name. For example, if we wish to find the package name that provides… Continue reading Linux how to find installed package name of Java and remove it
Linux find and remove files older than N days
Find files older than N days If you wish to find and delete certain files that are older than a certain amount of days, you can use this snippet: What this does is it finds all files matching the filter /path/to/files-beginning-with* that have been created more than 5 days ago. You can change the “+5”… Continue reading Linux find and remove files older than N days
Linux find top n largest folders/files
If you wish to find the largest folders/files in a specific directory, you can use the following commands. 1. Find largest folders For example to find the largest 20 directories in the /var/log directory, use this: 2. Find largest files Alternatively, if you wish to find the largest 20 individual files in the /var/log directory,… Continue reading Linux find top n largest folders/files
Convert .pfx to separate certificate and private key file
SSL certificates generated/exported via Windows are usually in the .pfx format. However some applications such as Linux or Java based applications require the certificate and private key to be in separate files. With the commands below you can export the individual parts from the .pfx file. 1. Export certificate and private key from .pfx with… Continue reading Convert .pfx to separate certificate and private key file
Linux disable TLS 1.0 and TLS 1.1 on Nginx
If you are using Nginx on Linux and wish to disable certain TLS protocols like TLS 1.0 and TLS 1.1, you can do so as follows: 1. Change Nginx config Open up the following file in your favorite editor (e.g. nano): Somewhere in this file, look for the following line which starts with “ssl_protocols”: In… Continue reading Linux disable TLS 1.0 and TLS 1.1 on Nginx
Linux how to check if webserver supports TLS 1.0/1.1/1.2/1.3
As of the time of writing, TLS 1.0 and 1.1 are not deemed safe anymore and prone to man-in-the-middle attacks. It is recommended to only support TLS 1.2+. On Linux you can check if your webserver accepts TLS 1.0 or TLS 1.1 via the following command: Check TLS 1.0 / 1.1 / 1.2 / 1.3… Continue reading Linux how to check if webserver supports TLS 1.0/1.1/1.2/1.3
Install Drush for Drupal 7.x on DirectAdmin
If you want to install Drush for Drupal 7.x on DirectAdmin (CentOS 8, RHEL 8 / AlmaLinux), you came to the right place. 1. Install dependencies Login via SSH to the server and execute the following commands to install Git and download Composer. 2. Download Drush via Git Use Git to checkout the version of… Continue reading Install Drush for Drupal 7.x on DirectAdmin
Linux cp yes to all
When you try to copy files or folders in Linux using the “cp” command, and the location already contains a file with the same filename, it can ask you whether you want to overwrite the old file: Normally you enter “y” or “n” here, but this message will pop up for every file you are… Continue reading Linux cp yes to all