How To Install the Django Web Framework 2 on Ubuntu 16.04

Here are the steps to install Django 2 on Ubuntu 16.04: Install Python3 and pip3:   sudo apt-get update sudo apt-get install python3 python3-pip Create a virtual environment for your Django project:   sudo pip3 install virtualenv virtualenv myenv source myenv/bin/activate Install Django:   pip install django==2.0 Verify that Django is installed correctly:   django-admin … Read more

How to hide PHP version 8/7/5 when using Nginx

To hide the PHP version information from being displayed in the server response headers in Nginx, you can modify your Nginx configuration file. Here’s an example of how to do it: Open the Nginx configuration file:   sudo nano /etc/nginx/nginx.conf Add the following line inside the server block:   server_tokens off; Save the changes and … Read more

How to extract substring in Bash

Bash provides several methods to extract substrings from strings. Here are a few commonly used methods: Using parameter expansion: Syntax: ${string:offset:length} offset is the starting position of the substring (0-based) length is the length of the substring Example:   string=”Hello, world!” echo “${string:7:5}” Output: world Using the cut command: Syntax: cut -c start-end start is … Read more

How to use KVM cloud images on Ubuntu Linux

To use KVM cloud images on Ubuntu Linux, you need to have KVM virtualization software installed on your system. Here’s the step by step guide to use KVM cloud images: Install KVM and required utilities:   $ sudo apt-get install qemu-kvm libvirt-bin virt-manager Download the cloud image: You can download cloud images from various cloud … Read more