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

yes command in Linux with examples

yes command in Linux with examples

The yes command in Linux will automatically output a “y” or any string you specify, repeatedly. It’s one of the simplest commands on Linux, and one that most users will find they never have much use for. But then when you do need it, you’ll be thankful that your Linux system already includes this Linux command by default.

Read more

ls command in Linux with examples

ls command in Linux with examples

The ls command in Linux is one of the most essential commands that every Linux user should know. If you’re a beginner to using the command line, ls is probably the first command you should try to learn. ls is short for list, and is used to list the files in your present working directory or some other directory if you specify one.

Read more

Recovering deleted files from a FAT filesystem on Linux

Data recovery of deleted files from the FAT filesystem

Although FAT32 or FAT16 are very old file systems, which is reflected in their poor performance in comparison to other file system alternatives, they are still widely used by many electronic devices. Usually, these devices include USB sticks, digital cameras, camcorders and other peripheral storage devices.

There’s a good chance that you own and store personal data on a device with the FAT filesystem. If you accidentally delete important data from the device, we’ve got good news for you: it can be recovered on Linux.

In this guide, we’ll go over the step by step instructions to recover deleted data from the FAT filesystem on Linux. Read on as we use the testdisk command to perform file recovery.

In this tutorial you will learn:

  • How to create a low level backup of FAT filesystem
  • How to install testdisk tool on major Linux distros
  • How to use testdisk to recover deleted files from FAT

Read more

USB stick encryption using Linux

USB stick encryption using Linux

If you were to ever lose your USB stick, all data stored on it will be lost. More importantly, your USB stick may end up in the hands of some other person, which will have access to your private files, and use that information in any way they please. This is one of many fears of USB stick users. One of the simplest solutions to this dilemma is to keep only non-private information on the USB stick. Obviously, this would defeat a primary purpose for the storage device.

Another solution is to encrypt your USB stick so it will be accessible only to those users who possess the correct password which will fit to decrypt the USB stick’s encryption. This article will deal with the second solution and that is encryption of a USB stick device. Although encrypting an USB stick seems to be the best and easiest solution, it must be said that it also comes with number of disadvantages. The first disadvantage is that decryption of the USB key must be done using a Linux system that has the dm-crypt module installed.

In other words, you cannot use your encrypted USB stick on any Windows machine and UNIX-like system with older kernels. Therefore, to encrypt only a part of the USB stick which holds only private information seems to be a good solution. In this article, we will go through the step by step instructions of encrypting part of a USB device on Linux. Read on to see how it’s done.

In this tutorial you will learn:

  • How to install cryptsetup on major Linux distros
  • How to partition a USB stick
  • How to encrypt a USB stick partition
  • How to mount encrypted partition

Read more

Configuring and testing a BIND nameserver on Linux

Linux DNS server BIND configuration

The BIND DNS software is one of the most reliable and proven ways to configure name resolution on a Linux system. Having been around since the 1980s, it remains the most popular Domain Name Server (DNS) currently in use. This article serves as a quick configuration manual of a Linux DNS server using BIND.

This article is not an introduction to DNS or an explanation of how the protocol works. Rather we will simply concentrate on a simple configuration of a custom zone and config file for a given domain / host supporting www and mail services. Follow along with the instructions below to get BIND DNS set up and configured on your own server.

WARNING
Before you proceed with the installation and configuration of BIND nameserver, make sure that BIND DNS server is exactly what you want. Default setup and execution of BIND on Debian or Ubuntu may take around 200MB of RAM with no zones added to the config file. Unless you reduce the memory usage of a BIND via various BIND “options” config settings, be prepared to have some spare RAM available just for this service. This fact is even more important if you pay for your own VPS server.

In this tutorial you will learn:

  • How to install BIND on major Linux distros
  • How to create a DNS zone file
  • How to configure address to name mappings
  • How to check BIND zone file and configuration
  • How to start or restart the BIND DNS service
  • How to test a BIND configuration with dig command

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

Getting to know the hardware of your Linux box

Getting to know the hardware of your Linux box

When you buy a new PC, laptop, or server and install a Linux distribution, you want to know what hardware is actually installed in the Linux box and more importantly which piece of hardware is supported by the kernel out of the box and which needs special tweaking with modules to get it to work.

This guide features a list of command line examples which should help you to troubleshoot your hardware and find some information about it. This is not an ultimate troubleshooting guide but certainly will serve as a good starting point. Note that some commands may not be available for your platform by default, and some commands may be specific to certain distributions.

In this tutorial you will learn:

  • How to see what hardware is installed via Linux commands

Read more

Viewing the iptables rules configured on our Linux system

Collection of basic Linux Firewall iptables rules

The purpose of this guide is to show some of the most common iptables commands for Linux systems. iptables is the firewall built into all Linux distributions. Even distros like Ubuntu, which utilizes ufw (uncomplicated firewall), and Red Hat, which utilizes firewalld still pass their commands to iptables and use it in the background.

Mastering iptables, or at least becoming familiar with some of the most basic commands, is essential for Linux administrators. Even casual Linux users can benefit from understanding the basics of the iptables firewall, since they may be required to apply some minor configurations to it at some point. Use some of the examples below to familiarize yourself with the iptables syntax and get an idea for how it works to protect your system.

WARNING
You should not apply iptables rules to a production system until you are somewhat familiar with how they work. Also be careful when applying rules to remote systems (a computer that you have established an SSH session with) because you can accidentally lock yourself out if you enter the wrong rule.

In this tutorial you will learn:

  • Collection of basic Linux firewall iptables rules
Viewing the iptables rules configured on our Linux system

Viewing the iptables rules configured on our Linux system

Read more

Developing and running an Android app on a Linux system

Get Started with Android application development using Linux and Android SDK

Developers interested in the Android mobile operating system are able to use the Android SDK and various IDE software to code applications. These apps can then be made available and marketed to Android users around the world.

There are a lot of choices when it comes to programming Android applications. Your coding environment can involve a Linux system and a variety of different IDE programs to facilitate all of the software development. The trouble here is that each Linux distribution will often have a different set of requirements to run the sofware, and a separate list of steps that need to be followed.

In this guide, we’ll go through the step by step instructions to install Android Studio – which is one of the most popular Android IDEs – on a Linux system. This will work on any distribution because we’ll be using Snap package manager to manage the installation. Love it or hate it, the Snap package manager gets your system ready for Android development very quickly, by handling all the dependencies and working identically on any distribution you’re running, whether it be Ubuntu, Debian, Red Hat, CentOS, AlmaLinux, openSUSE, or any other type of Linux system.

Follow along with us below as we setup Snap package manager, install Android Studio, and then program a Hello World Android application to verify that everything is working properly.

In this tutorial you will learn:

  • How to setup Snap package manager
  • How to install Android Studio and SDK packages
  • How to create a Hello World test application
  • How to run an Android application on an emulated device

Read more