How to use watch Linux command

Watch command in Linux with Examples

Have you ever had to sit at a Linux terminal and repeatedly type the same command while waiting for a different result? A common example from personal experience would be typing the ls command when waiting for a certain file to appear in a directory, such as when a running Bash script is expected to generate a file. For a situation like that is exactly why we have the watch command in Linux.

Read more

How build grub from source on Linux

GRUB compile from source on Linux

GRUB is the acronym for GNU GRand Unified Bootloader: it is the bootloader used in practically all Linux distributions out there. Early in the boot stage, the bootloader is loaded by the machine firmware, either BIOS or UEFI (GRUB supports both of them), and it loads one of the available kernels. Being an essential software, grub is installed by default and available in the official repositories of distribution we are using;

Read more

NFS vs SAMBA vs CIFS

NFS vs SAMBA vs CIFS

NFS, SAMBA, and CIFS are three different terms that get thrown around a lot whenever someone mentions file sharing between two or more systems. But, do you know what these three implementations do, and how they do it differently from one another? For some reason these technologies remain in a shroud of mystery to even some seasoned system administrators.

Read more

How to crack a wireless WEP key using aircrack-ng

How to crack a wireless WEP key using AIR Crack

This article shortly describes simple steps on how to crack a wireless WEP key using aircrack-ng software. This can be done by sniffing a wireless network, capturing encrypted packets and running appropriate encryption cracking program in an attempt to decrypt captured data. WEP ( Wired Equivalent Privacy ) is quite easy to crack as it uses only one key to encrypt all traffic.

Read more

Configuring a USB drive to mount automatically in Linux

Automatically mount USB external drive

The default behavior of most Linux systems is to automatically mount a USB storage device (such as a flash drive or external drive) when it gets plugged into the computer. However, this is not the case across every distro, or sometimes configurations go awry and you may find that your device is not being automatically mounted. You may also just want your storage device to mount when you plug it in before booting.

Read more

Adding a directory to $PATH on Linux

Permanently add a directory to shell PATH

When you type a command into a Linux terminal, what’s really happening is that a program is being executed. Normally, to execute a custom program or script, we need to use its full path, such as /path/to/script.sh or just ./script.sh if we’re already in its residing directory. Alternatively, we can execute a lot of commands without specifying paths, like uptime or date, etc.

The reason we don’t need to specify paths for some commands is because of the $PATH variable. This is a variable that can be configured to tell our Linux system where to look for certain programs. That way, when typing date into the terminal, Linux checks the $PATH variable to see a list of directories to look for the program.

In this guide, we’ll see how to add a directory to the $PATH variable on Linux. This will enable you to call on your program or script from anywhere in the system, without needing to specify the path to where you’ve stored it. Follow along with us as we show how to view the directories in $PATH, and add a directory either temporarily or permanently to the variable.

In this tutorial you will learn:

  • How to see currently configured directories in $PATH shell variable
  • How to temporarily add directory to $PATH
  • How to permanently add directory to $PATH
Adding a directory to $PATH on Linux

Adding a directory to $PATH on Linux

Read more

Fixing the remote host has changed warning message

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

When you use SSH to login to a remote system, the host’s identification key is stored inside your user’s home folder. If you try to SSH into the remote system again in the future, your computer will check to make sure that you’re logging into the same system as before. Sure, the IP address or hostname might be the same, but maybe a different system has taken over that IP or hostname. If that’s the case, you wouldn’t want to enter your password into the foreign system.

When this is detected, you’ll receive a warning to the effect of WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!. Then again, sometimes a remote host’s keys could have changed for a perfectly legitimate reason. If you know this to be true, then you can ignore the warning.

In this guide, we’ll show you how to bypass the SSH remote host warning, as well as permanently remedy the problem on a Linux system. Read on to see how.

In this tutorial you will learn:

  • How to remove invalid SSH host key from config
Fixing the remote host has changed warning message

Fixing the remote host has changed warning message

Read more