Guides
How website valuation actually works, what traffic estimates can and cannot tell you, and which once-standard metrics have quietly stopped existing.
How to use a here documents to write data to a file in bash script
A "here document" is a way to specify multiple lines of text as the input to a command in a shell script. In a bash script, you can use a here document to write data to a file. Here's an example of how to use a here document to write data to a file: #!/bin/bash # The file to write to rnfile= "t
How to delete a user account on Ubuntu Linux
Here are the steps to delete a user account on Ubuntu Linux: n n n Log in as root or use the sudo command to run the following commands with administrative privileges: n n n sudo su n n n n n Use the userdel command to delete the user account. Replace username with the actual username you want to de
How To Install the Django Web Framework 2 on Ubuntu 16.04
Here are the steps to install Django 2 on Ubuntu 16.04: n n n Install Python3 and pip3: n n n sudo apt - get update nsudo apt - get install python3 python3 - pip n n n n n Create a virtual environment for your Django project: n n n sudo pip3 install virtualenv nvirtualenv myenv n source myenv/bin/ac
How to install keychain manager for ssh-agent on CentOS 6/7
Keychain is a shell script that allows you to manage multiple ssh-agents and store the ssh keys for a user in one place. Here is how you can install and use Keychain on CentOS 6/7: Install the 'keychain' package: sudo yum install keychainrn Start the ssh-agent: eval $(keychain -- eval --agents ssh i
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.confrn Add the following line inside the server block: serv
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!" rn echo
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-managerrn Download the cloud image: You can dow
How to install Redis server on Ubuntu Linux 16.04
To install Redis server on Ubuntu Linux 16.04, you can use the package manager apt-get . Here's the step by step guide: Update the package index: $ sudo apt - get update rn Install Redis: $ sudo apt- get install redis-serverrn Verify the installation: $ redis-cli pingrn PONG rn If you receive a PONG
How to flush Redis cache and delete everything using the CLI
To flush all data from a Redis cache and delete everything, you can use the FLUSHALL command in the Redis CLI (command line interface). Here's how to use the FLUSHALL command: Connect to the Redis CLI: $ redis-clirn Issue the FLUSHALL command: 127.0.0.1:6379> FLUSHALL rn OK rn The FLUSHALL comman
How to delete and remove files on Alpine Linux
To delete and remove files on Alpine Linux, you can use the rm command in the terminal. Here are some examples of how to use the rm command: To delete a single file, use the following syntax: $ rm rn Replace with the name of the file you want to delete. For example: $ rm myfile.txt rn To delete mult
How to delete and remove files on Debian Linux
To delete and remove files on Debian Linux, you can use the rm command in the terminal. Here are some examples of how to use the rm command: To delete a single file, use the following syntax: $ rm rn Replace with the name of the file you want to delete. For example: $ rm myfile.txt rn To delete mult
How to configure wireless wake-on-lan for Linux WiFi card
To configure wake-on-LAN (WOL) for a Linux WiFi card, you need to make sure that the card supports WOL, and then enable WOL in the system's BIOS and in the operating system. Here are the general steps to configure WOL for a Linux WiFi card: Check if your WiFi card supports WOL: You can check if your
How to enable and start services on Alpine Linux
To enable and start services on Alpine Linux, you can use the rc-update and service commands. Here's the basic process: Enable the service: # rc - update add default rn Replace with the name of the service you want to enable, such as sshd for the SSH daemon. The default argument sets the service to
How to find and tar files into a tar ball
To find and tar (create an archive) files into a tar ball ( .tar file) in Linux, you can use the tar command in combination with the find command. Here's the basic syntax: $ find -name -exec tar -czf {} +rn : The directory you want to search for files. : A shell pattern that matches the filenames yo
How to execute a shell script in Linux
To execute a shell script in Linux, you need to follow these steps: Give execute permission to the script: $ chmod +x script.sh rn Run the script: $ ./script.sh rn You can also run the script by specifying the interpreter, like this: $ sh script.shrn Or: $ bash script.shrn If the script is located i
How to change root password on RHEL ( Red Hat Enterprise Linux)
To change the root password on Red Hat Enterprise Linux (RHEL), you can use the passwd command. This command allows you to change the password for the current user (in this case, the root user). n Here’s how you can use the passwd command to change the root password: n n Log in to your system
Unix command to find a file in a directory and subdirectory
To find a file in a directory and its subdirectories on Unix, you can use the find command. Here's the basic syntax of the find command: $ find rn Where: is the directory or directories where you want to search for the file. By default, is the current directory ( . ). is a set of options and tests t
How to show recursive directory listing on Linux or Unix
To show a recursive directory listing on Linux or Unix, you can use the ls command with the -R option: $ ls -R rn This will display a recursive listing of all the files and directories under the current directory, including the subdirectories and their contents. You can also use the find command to
How to use/run bash aliases over ssh based session
Bash aliases are only available in the current shell session, so they are not automatically available in an SSH-based session. However, you can make your aliases available in an SSH-based session by adding them to a shell startup file, such as ~/.bashrc , ~/.bash_profile , or ~/.bash_aliases . Here'
How to show current logged in users in Linux
You can use the w command to show the current logged-in users on a Linux system: $ wrn This command will show the following information for each user: USER : the username of the user. TTY : the terminal associated with the user. FROM : the hostname or IP address from which the user logged in. LOGIN@
2,685 guides published.
