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 install nmap on a Debian Linux 9/10/11
To install nmap on a Debian Linux 9/10/11 system, you need to use the package manager apt . Here's the process to install nmap :rn rn Update the package index: rn rn rn rn sudo apt update rn rn rn rn Install nmap : rn rn rn rn sudo apt install nmaprn rn rnThis will install nmap and any other package
Python: Find Out If a File Exists or Not Using isfile() Function
In Python, you can use the os.path.isfile() function to check if a file exists. The os.path.isfile() function takes a file path as its argument and returns True if the file exists and is a regular file, and False otherwise. Here's an example:rn rn rn import os . path file_path = '/path/to/fil
Linux/Unix: grep Command Show Line Numbers While Displaying Output
The grep command is used to search for a pattern in a file or files. To display the line numbers along with the matching lines, you can use the -n option. Here's an example:rn rn rn grep -n 'pattern' file.txtrn rn rnIn this example, pattern is the string you're searching for, and file.txt is the
Linux / Unix: Command Show Directory Listing
In Linux or Unix, you can use the ls command to show the directory listing. The ls command lists the files and directories in a specified directory. By default, it lists the contents of the current directory. Here are some common options that can be used with the ls command:rn rn -l : Display the
Linux: Run fsck On LUKS (dm-crypt) Based LVM Physical Volume
n n n n n n To run fsck on a LUKS (dm-crypt) based LVM physical volume, you need to follow these steps: n n Unlock the LUKS partition: First, you need to unlock the LUKS partition to access the LVM physical volume. You can do this by running the following command: n n n n sudo cryptsetup luksOpen /d
How to find OS version in Ubuntu Linux
There are several ways to find the OS version in Ubuntu Linux:rn rn Using the lsb_release command: This command provides information about the Linux Standard Base (LSB) and the version of Ubuntu that you're running. To use it, run the following command in your terminal: rn rn rn lsb_release - a rn r
Linux delete user command
To delete a user on a Linux system, you can use the userdel command. Here's the basic syntax for using the userdel command:rn rn rn userdel < username > rn rn rnFor example, if you want to delete the user john , you would run the following command:rn rn sudo userdel johnrn rn rnNote that by
CentOS / RHEL Install htop Process Viewer
htop is a popular process monitoring tool for Linux that provides a more user-friendly and interactive way of monitoring system processes than the standard top utility. Here’s how you can install htop on CentOS or RHEL: n n Update the package index: Before installing any new packages, you shou
Linux: Neighbour Table Overflow Error and Solution
The "Neighbour Table Overflow" error in Linux can occur when the system's neighbor cache table, which is used to store information about network neighbors such as ARP cache entries, has become full. This can result in network connectivity issues and may cause other problems, such as high network lat
Linux: Find Out What Partition a File Belongs To
To find out what partition a file belongs to on Linux, you can use the df command with the -P option, which displays the file system space usage, including the file system type, total size, used space, available space, and the mounted file system. Here's the basic syntax for using the df command:
Mediawiki PHP Fatal error: Cannot redeclare wfProfileIn() Error and Solution
The PHP Fatal error: Cannot redeclare wfProfileIn() error in MediaWiki typically occurs when there is a conflict between multiple copies of the same function or class in your MediaWiki installation. This error can be caused by a number of different issues, such as:rn rn Multiple copies of the sam
RHEL / CentOS Yum Command: Blacklist Packages [ Disable Certain Packages ]
To blacklist packages using the yum package manager on Red Hat Enterprise Linux (RHEL) or CentOS, you can create a file in the /etc/yum.repos.d/ directory that excludes the packages you want to blacklist. The file should have the extension .repo , and the content should specify the packages you want
CentOS / RHEL: Change / Copy File SELinux Security Context Command
In CentOS and Red Hat Enterprise Linux (RHEL), you can change or copy the SELinux security context of a file using the chcon or semanage command. The chcon command is used to change the SELinux security context of a file, and it has the following syntax:rn rn rn chcon < context > < file
CentOS / RHEL: yum Command Reinstall Package
To reinstall a package using the yum package manager on CentOS or Red Hat Enterprise Linux (RHEL), you can use the yum reinstall command, followed by the name of the package you want to reinstall:rn rn sudo yum reinstall < package_name > rn rn rnFor example, if you want to reinstall the httpd
Linux / Unix: Disable OpenSSH Host Key Checking
In OpenSSH, host key checking is a security feature that is enabled by default. It prevents man-in-the-middle attacks by verifying that the server you are connecting to is the one you intended to connect to, by checking its host key against the list of known host keys stored in your local machine. n
How To List Directories In Linux or Unix Recursively
In Linux or Unix, you can list the contents of a directory and its subdirectories recursively using the ls command with the -R or --recursive option. Here's an example:rn rn rn ls -R /path/to/directoryrn rn rnThis will list the contents of the directory /path/to/directory and all its subdirectories,
How To List Directories In Linux or Unix Recursively
In Linux or Unix, you can list the contents of a directory and its subdirectories recursively using the ls command with the -R or --recursive option. Here's an example:rn rn rn ls -R /path/to/directoryrn rn rnThis will list the contents of the directory /path/to/directory and all its subdirectories,
Linux: Find Out Open Files [ Descriptors ] Command
You can use the lsof (list open files) command in Linux to find out which files (also called descriptors) are open by a process. The lsof command displays a list of all open files and the processes that have them open. To display the open files for a specific process, you can run the following co
Linux / Unix: SysVinit Services Restart vs Reload vs Condrestart
In the SysVinit init system, which is used in many Linux and Unix distributions, there are several commands to control system services:rn rn restart : The restart command stops the service and then starts it again. This is useful when you want to apply changes to the service's configuration. rn rn r
Linux / Unix Shell Script Get Current Year
In a Linux or Unix shell script, you can get the current year using the date command. For example:rn rn rn current_year= $(date +%Y) rn rn rnThe date command is used to print or set the system date and time, and the +%Y option specifies that the year in the format YYYY should be displayed. The outpu
2,685 guides published.
