CentOS / RHEL Linux: Remove GDM

To remove the GDM (GNOME Display Manager) graphical login screen on CentOS or Red Hat Enterprise Linux, you need to uninstall the gdm package using the yum package manager. First, use the following command to check if GDM is installed: yum list installed | grep gdm If the package is installed, you can remove it … Read more

OpenSSH Hide Version Number From Clients

The OpenSSH server can be configured to hide its version number from clients, making it more difficult for attackers to target known vulnerabilities in specific versions of the software. This can be done by editing the OpenSSH server configuration file, usually located at /etc/ssh/sshd_config. To hide the version number, add the following line to the … Read more

HowTo: Linux Install LibreOffice

The process of installing LibreOffice on Linux depends on the specific Linux distribution you are using. Here are the steps for installing LibreOffice on some popular Linux distributions: Ubuntu: sudo apt-get update sudo apt-get install libreoffice Fedora: sudo dnf install libreoffice CentOS: sudo yum install libreoffice Debian: sudo apt-get update sudo apt-get install libreoffice Arch … Read more

UNIX / Linux: Shell Scripting With mail Command

The mail command in Unix/Linux can be used to send emails from the command line. Here’s an example of how to use the mail command in a shell script: #!/bin/bash to=”recipient@example.com” subject=”Test Email” message=”This is a test email sent from the shell script.” echo “$message” | mail -s “$subject” “$to” In the example above, the … Read more

UNIX / Linux: awk Add Two Numbers

To add two numbers in Unix or Linux using awk, you can use the following command: awk ‘BEGIN {print [number1] + [number2]}’ Replace [number1] and [number2] with the two numbers you want to add. For example, to add the numbers 10 and 20, you would use the following command: awk ‘BEGIN {print 10 + 20}’ … Read more