≡ Menu

HowTo

How to run bin or exe files on Linux?

The file types bin and exe are executable files that are self extracting and self installing archives. In most cases, you don't have to do anything to these files to execute them. Just change the permissions to be executable by all! For example, if your file is called executable.bin, you can run the following commands [...]

{ 0 comments }

grep – number of lines that contain a word

The command grep is a very useful command for pattern matching. It is a very versatile command that can do all sorts of cool things like matching regular expressions to strings. In some cases, it is necessary to count the number of times a word appears in a file. It is easy to do this [...]

{ 0 comments }

Change the IP address of a domain name – Bind

Bind is a DNS server that allows you to run your own name servers. It is a very professionally written DNS server and it supports all RR types using its configuration file called named.conf. On my Linux CentOS box, named.conf is located in the following location: /etc/named.conf This file contains all the options that Bind [...]

{ 0 comments }

Change SSH server listening IP addresses

The question - I want to make the SSH server (OpenSSH) to listen on multiple IP addresses. How do I do that? The OpenSSH server listens on port 22 on one or more IP addresses. It provides secure shell functionality to login to a remote server using SSH. The OpenSSH server can listen on one [...]

{ 0 comments }

Interesting dig command examples (Linux)

The command dig is a very useful tool to do DNS lookups on the command line on Linux. The host and nslookup commands produce equivalent output, but in a different format. The dig output is more detailed with several statistics about the command outputted. In this tutorial, I will illustrate using examples on how to [...]

{ 0 comments }

The question - I need to check if my DNS name server (Bind) supports recursion. Is there a Linux command that can do this? If you ask your name server for domain names which are not in the local zone file, it should respond with a REFUSED error code. If you get the REFUSED DNS [...]

{ 0 comments }

Linux command to get IP address

Question - I need to find the IP address of my Linux machine. Is there a command that can do this on CentOS? The ifconfig command can be used to get all of the IP addresses of a Linux machine. The command can be used to get information about network adapters and their IP addresses. [...]

{ 0 comments }

dig – Command Not Found and Installation

Question - I am trying to perform DNS queries using the command dig. But I get a command not found. How do I fix this? The command dig is a great utility to perform DNS lookups on the SSH command line or a local terminal in a Linux box. The command dig is part of [...]

{ 0 comments }

If you do a DNS query, the DNS server will return the status of the query like NXDOMAIN or NOERROR. All of these return codes have a specific meaning. For example, NXDOMAIN means that the domain name does not exist. NOERROR means that the query completed successfully. REFUSED means that the DNS server refused to [...]

{ 0 comments }

How to backup RPM database on Linux?

The RPM database contains information about installed packages and the library of available packages on a Linux system. RPM stands for Red Hat Package Manager and is available on Red Hat, Fedora and CentOS systems. It is always a good idea to backup your RPM database so that if it becomes corrupt, you can restore [...]

{ 0 comments }