MX records in DNS are used to route emails to correct mail servers and properly send to correct destination server. If you are using Google apps account for hosting email accounts on Google servers for your domains, then you need to add following MX records in your domains DNS configuration. Google Apps MX Records: @ IN MX 1 ASPMX.L.GOOGLE.COM @ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM @ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM @ IN MX 10 ALT3.ASPMX.L.GOOGLE.COM @ IN MX 10 ALT4.ASPMX.L.GOOGLE.COM
Author: Rahul
Generally Ubuntu users used Synaptic Package Manager for GUI and apt package manager for command line for installing packages. But not all latest application’s provides pre compiled packages for system, In that case you need to compile it using source code for installing application on your system. This article will help you for installing packages using source archive on Ubuntu systems. Prerequisites Before working with the compilation of source package, First we need to prepare our system with requirements for compilation. $ sudo apt-get install apt-file autoconf build-essential checkinstall Extract Source Package Firstly download the source archive on your system…
Command: md5sum myfile.php > myfile.php.md5 Above command will generate md5 checksum of file myfile.php and store in file myfile.php.md5. myfile.php.md5 can be used to verify integrity of file anytime. Generate MD5: If we want to generate md5sum of a file named index.php. Use the following command to do it and store generated md5 value of file in index.php.md5 file. # md5sum index.php > index.php.md5 Verify MD5: Now in future we can use index.php.md5 to verify integrity of file using following command. This command will show output as OK or FAILD. # md5sum -c index.php.md5
Linux, much like any other operating system, relies on processes for its operations. Occasionally, these processes may become unresponsive or consume excessive system resources, necessitating their termination. The following article presents a detailed guide on how to kill a process by its name in Linux, a crucial skill for Linux users and administrators alike. What is a Process? Before we dive in, it’s crucial to understand what a process is. A process, in the simplest terms, is an instance of a program in execution. Each process has a unique identifier called a Process ID (PID), which the operating system uses…
We can easily get values passed in url query string using JavaScript or jQuery. Here is an simple examples of getting query string values with JavaScript. To do this create a function like getParamValuesByName and add one of example codes given below. In the below examples function getParamValuesByName() will parse the query string values and returned matching values based on there named passed as parameter. Example 1: <script type=”text/javascript”> function getParamValuesByName (querystring) { var qstring = window.location.href.slice(window.location.href.indexOf(‘?’) + 1).split(‘&’); for (var i = 0; i < qstring.length; i++) { var urlparam = qstring[i].split('='); if (urlparam[0] == querystring) { return urlparam[1];…
This tutorial will help you to redirect a webpage to another webpage using JavaScript. Here are 3 examples of redirecting webpage to another with JavaScript. Example 1: We can redirect user to other page using window.location.replace in JavaScript. window.location.replace has pretty similar to an HTTP redirect.
1 | window.location.replace("https://example.com"); |
Example 2: It is better to use window.location.href in place of window.location.replace, because replace() function does not put the originating page in the session history.
1 | window.location.href = "https://example.com"; |
Example 3: We can also simply redirect to any internal website page using window.location.
1 | window.location.href = "/other-page/"; |
The JavaScript indexOf() method search for the substring in string and returns the position of the first occurrence of a specified substring. If substring not found, it returns -1. So you can use JavaScript IndexOf() method to check if a string contains substring in it. In this tutorial we will also provides example to use JavaScript includes() and search() methods to find substring in another string. In a comparison of all 3 methods describes below, indexOf() can be better due to its speed of execution. If no speed matters, you can use any of the following methods. Using indexOf() Method…
Command: echo <password> | passwd –stdin <username> Example: Use the following command to change password of user jack in a shell script. For example we are using string password as password. echo “password” | passwd –stdin jack Assigning User Input Password: Use the following commands to input password from user and assign to user jack. read -p “Enter Password for User jack: ” pwd echo $pwd | passwd –stdin jack Also we can prompt password twice from user to make confirmation that user has memorize it correctly. Use the following commands to input password twic from user and assign to…
Command: while true;do echo “Press CTRL+C to Exit”; done Example 1: Some times we are required to execute some commands or processes continuously until stop it forcefully or conditionally. The following example of while loop will run continuously until stopped forcefully using ctrl + c. while true do echo “Press CTRL+C to Exit” done Example 2: We can also use colon “:” in place of “true” with while loop for creating infinite loop in bash script. while : do echo “Press CTRL+C to Exit” done Stopping Loop on Condition: In case we need to terminate an infinite while loop on…
Sometimes you may be required to count total lines in a file in Unix/Linux systems. This tutorial helps you with multiple methods to count the number of lines in a file in a Linux system via the command line. Count lines with wc Command The wc command is the “word counter” for the Unix/Linux systems. This is a widely used command among Linux users for counting the lines in a file. It is also useful for counting words and characters in a file. Open a terminal and type command to count lines: wc -l myfile.txt You can also count the…