Linux / UNIX: DNS Lookup Command

The nslookup command is a tool for performing DNS lookups in Linux and UNIX systems. This command allows you to query a DNS server for information about a hostname, including its IP address and other information. Here’s an example of using the nslookup command to perform a DNS lookup for the hostname www.google.com: nslookup www.google.com … Read more

Linux Network IP Accounting

IP accounting in Linux is a feature that allows you to keep track of the amount of network traffic that is generated by or destined for specific IP addresses. This can be useful for various purposes, such as monitoring network usage, tracking the source of network problems, and enforcing network usage policies. There are several … Read more

Linux / UNIX scp Copy Hidden . (Dot) Files

In Linux and UNIX, hidden files are files that start with a dot (.) character. To copy hidden files using scp, you simply need to include the file name with the dot in the source and destination paths. Here’s an example of copying a hidden file named .myfile from the local machine to a remote … Read more

Linux Find Out My IP Number ( IP Address )

You can find your IP address in Linux using the following methods: Using the ip command: ip addr show | grep ‘inet ‘ | grep -v 127.0.0.1 | awk ‘{print $2}’ This will show your IP address (or addresses) along with the associated network interfaces. Using the hostname command: hostname -I This will show your … Read more

Linux / UNIX: PHP mail() Error Log File

The error logs generated by the mail() function in PHP can be found in various locations, depending on the operating system and configuration of your system. Here are some common locations where the error logs may be stored: /var/log/mail.log or /var/log/syslog: On many systems, the error logs generated by the mail() function will be stored … Read more

IPv6 Address Example

An IPv6 address is a 128-bit address that is used to identify devices on a network. Here is an example of an IPv6 address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 This is a valid IPv6 address that follows the format defined in the IPv6 standard. It is composed of 8 blocks of 4 hexadecimal digits separated by colons. The leading … Read more

Linux / UNIX: Change Bash To KSH Shell

You can change the default shell in Linux or UNIX to KSH (KornShell) using the following steps: Check if KSH is installed on your system: which ksh If KSH is not installed, you can install it using the package manager for your operating system (e.g., apt-get on Ubuntu, yum on Fedora, etc.). Verify that you … Read more

vi Find And Replace Text Command

In the vi text editor, you can replace text in the following ways: Replace a single instance of a word: Position the cursor on the word you want to replace. Type r followed by the replacement text. Replace all instances of a word in a single line: Press the Esc key to enter normal mode. … Read more

resolvconf: Error: /etc/resolv.conf must be a symlink Error and Solution

The error “resolvconf: Error: /etc/resolv.conf must be a symlink” occurs when the /etc/resolv.conf file on a Linux system is not a symbolic link, which is the expected configuration for systems using the resolvconf package. The solution to this error is to create a symbolic link for /etc/resolv.conf pointing to /run/resolvconf/resolv.conf. This can be done using … Read more