Learning bash scripting for beginners

Posted on in Categories Command Line Hacks, Howto, Open Source last updated January 6, 2017

Bash (Bourne-Again SHell) is a Linux and Unix-like system shell or command language interpreter. It is a default shell on many operating systems including Linux and Apple MacOS X. Shell scripts are a fundamental part of the Unix programming environment.

If you have always used a graphic user interface like KDE or Gnome or MS-Windows or Apple OS X, you are likely to find bash shell confusing. If you spend some time with the bash shell prompt and it will be difficult for you to go back.

Learn bash

Here are a list of tutorials and helpful resources to help you learn bash scripting and bash shell itself. You should read the following documents if you are interested in learning the basics of shell scripting.

A Shell Primer: Master Your Linux, OS X, Unix Shell Environment

Posted on in Categories Command Line Hacks, Howto last updated November 9, 2016

On a Linux or Unix-like systems each user and process runs in a specific environment. An environment includes variables, settings, aliases, functions and more. Following is a very brief introduction to some useful shell environment commands, including examples of how to use each command and setup your own environment to increase productivity in the command prompt.

Linux and Unix nload App: Monitor Network Traffic and Bandwidth Usage In Real Time

Posted on in Categories Command Line Hacks, Debian Linux, Networking last updated April 17, 2014

If you want to monitor network throughput on the command line interface, use nload application. It is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in and outgoing traffic using two graphs and provides additional info like total amount of transferred data and min/max network usage.

Top 8 Tools To Search Memory Under Linux / Unix [ Forensics Analysis ]

Posted on in Categories Command Line Hacks, Hardware, Open Source, Programming last updated March 19, 2013

You can dump Linux or Unix server memory. This is useful for forensics analysis, and testing your own system. This is often desirable to see:

  • What code and what data actually resides in memory.
  • You can search for specific pids memory.
  • Search memory for string and other data such as passwords.
  • Works as add-on tool for gdb and others.
  • Search/replace/dump memory from running processes and core files.
  • All kinds of deep hacking activities that simply saves your time and solve problems.

Solaris / Linux: nicstat Command Show Network Interface Card Statistics

Posted on in Categories Command Line Hacks, Hardware, Networking last updated March 13, 2013

nicstat-welcomeThe nicstat command is top like utility for network interface card (NIC). It displays information and statistics about all your network card such as packets, kilobytes per second, average packet sizes and more. It works under Solaris and Linux operating systems.

In this post, I will explain how to install and use the nicstat command to find out stats about your NICs under Debian / Ubuntu / RHEL / CentOS Linux operating systems.

Top 30 Nmap Command Examples For Sys/Network Admins

Posted on in Categories Command Line Hacks, Howto, Networking, Security last updated January 13, 2017

Nmap is short for Network Mapper. It is an open source security tool for network exploration, security scanning and auditing. However, nmap command comes with lots of options that can make the utility more robust and difficult to follow for new users.

The purpose of this post is to introduce a user to the nmap command line tool to scan a host and/or network, so to find out the possible vulnerable points in the hosts. You will also learn how to use Nmap for offensive and defensive purposes.

diff Command: Colorize Output On The Unix / Linux Command Line

Posted on in Categories Command Line Hacks, Programming, Web Developer last updated November 26, 2012

The diff command compare files line by line and displays a list of changes between two file. You can use diff command to:

  1. See the changes between one version of a file.
  2. Compare two configuration or program files.
  3. Create a patch file which can be applied with the Linux / Unix program patch.

Say hello to colordiff

colordiff is a wrapper for diff and produces the same output as diff but with coloured syntax highlighting at the command line to improve readability. colordiff has been tested on various flavours of Linux and under OpenBSD, but should be broadly portable to other systems.