AMAZON

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, September 19, 2012

Ns2 installation for different linux OS: fedora 17, ubuntu 12.04, Redhat


Installing Network Simulator 2 version

NS2.35 in Ubuntu 11.10,

Download NS-2.35 (http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download)

Unzip or untar it to any folder (recommended is /home/loginname) using the following commands one by one

sudo apt-get update
sudo apt-get build-essential autoconf automake libxmu-dev
tar zxvf ns-allinone-2.35.tar.gz
cd ns-allinone-2.35
./install

Once installed the PATH information will be provided to you. 
Copy the PATH and LD_LIBRARY_PATH Variable to .bashrc (see a dot in the beginning)
Input the path information in .bashrc file like this  
export PATH=$PATH:<Place your paths here>
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: <place the LD_LIBRARY_PATHS> here.
Once done, save the file and close

execute the command
source .bashrc

try ns or nam to see whether your installation succeeded.

NS-2.35 in Ubuntu 12.04 LTS -Long Term Support

To install ns2 in Ubuntu 12.04, same step as done in Ubuntu 11.10

Download NS-23.5 from http://www.isi.edu/nsnam/ns/

Go to terminal and install the necessary updates using the command “sudo  apt-get update”  (without Quotes)
Then install the ns2 required libraries using the command “sudo apt-get install build-essential autoconf automake libxmu-dev” (without quotes)
Untar the downloaded ns-allinone-xxx.tar.gz file using the command “tar zxvf ns-allinone-2.35.tar.gz”
execute the commands one by one as given below
cd ns-allinone-2.35
./install
(You get the PATH information if the installation was successful, upon succeeding set the PATH in the relevant file .bashrc)

Type ns and see a  % symbol indicates that the installation of ns2 is successful and also try the command  nam so that a network animator will be opened.

For any doubts, please raise a comment in the following column. I am there to help you.
If you try to install ns2 which comes along with the synaptic package manager, you cannot write new modules and recompile it.
In that case, you need to use the above method of installation

NS2.35 in Fedora 16
Steps:'
Install Fedora using a DVD ISO (if you go for a CD iso, then you need to download lot of packages)
Download NS-2.35 from this website.
http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download
Unzip or untar it to any folder (recommended is /home/loginname) using the following commands one by one
tar zxvf ns-allinone-2.35.tar.gz
cd ns-allinone-2.35
./install
Once installed the PATH information will be shown in the screen.
Copy the PATH and LD_LIBRARY_PATH Variable to .bash_profile (see a dot in the beginning)
Input the path information in .bash_profile like this
There will be a PATH Variable already available in the .bash_profile file, just copy the PATH information from the NS2 installation and append it over the existing PATH variable (but put a separator : between each path)
export PATH=$HOME/bin:<Put a colon and Place your paths here>
export LD_LIBRARY_PATH=<place the LD_LIBRARY_PATHS> here.
Once done, save the file and close
execute the command
source .bash_profile
try ns (if you see a % indicates ns is installed successfully) or nam (a animation window will be opened).
 NS 2.35 In Fedora 15
Download ns-allinone-2.35 from the NS2 website. The recent version was RC8
select the folder /home/username, untar the file using the command "tar zxvf ns-allinone-xxx.tar.gz" (without quotes).
Go to the folder /home/username/ns-allinone-2.35/ using the command cd  /home/username/ns-allinone-2.35 /  and execute the command ./install (dot /install)
You may encounter an error in the file mac_80211Ext.h and correct the error given in the following line
Open the file /home/username/ns-allinone-2.35/ns-2.35/mac/mac_80211Ext.h and include the following line in the header file area
#include <cstddef>
Go to step3 and type ./install 
Once installation completed, set the path information in .bash_profile (dot bash_profile). you need to set two path variables PATH and LD_LIBRARY_PATH
  
Edit this similar fashion with corresponding version of fedora 15 which u have installed "packages version - octl, tcl, nam, tk,
Now go to /etc folder and type

gedit ~/.bashrc

Add the following lines to the end of it. Remember replace "/your/path" by something like "/home/vina". And accordingly also change the version numbers. This is for ns 2.35.

# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.35/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LI B:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY 
TCL_LIB=/your/path/ns-allinone-2.35/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH 
XGRAPH=/your/path/ns-allinone-2.35/bin:/your/path/ns-allinone-2.35/tcl8.4.14/unix:/your/path/ns-allinone-2.35/tk8.4.14/unix
NS=/your/path/ns-allinone-2.35/ns-2.35/
NAM=/your/path/ns-allinone-2.35/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

 NS 2.27 in Red hat

there are following steps: 
tar -xzf *
./install
change .bash_profile and add some environment variables. put /home/vinay/ns-allinone-2.27/bin:/home/vinay/ns-allinone-2.27/tcl8.4.5/unix:/home/vinay/ns-allinone-2.27/tk8.4.5/unix into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/vinay/ns-allinone-2.27/otcl-1.8, /home/vinay/ns-allinone-2.27/lib,
 into your LD_LIBRARY_PATH environment variable.
 If it complains about X libraries, add path to your X libraries
 into LD_LIBRARY_PATH.
 If you are using csh, you can set it like:
 setenv LD_LIBRARY_PATH ....
 If you are using sh, you can set it like:
 export LD_LIBRARY_PATH=....
(2) You MUST put /home/vinay/ns-allinone-2.27/tcl8.4.5/library into your TCL_LIBRARY 
environmental variable. Otherwise ns/nam will complain during startup.
(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.5
 and tk8.4.5. They are now installed under /home/vinay/ns-allinone-2.27/{bin,include,lib}
so , finally the bash_profile is like this:

PATH=$PATH:$HOME/bin:/home/vinay/ns2/ns-allinone-2.27/bin:/home/vinay/ns2/
ns-allinone-2.27/tcl8.4.5/unix:/home/vinay/ns2/ns-allinone-2.27/tk8.4.5/unix

export LD_LIBRARY_PATH=/home/vinay/ns2/ns-allinone-2.27/otcl-1.8:home/
vinay/ns2/ns-allinone-2.27/lib

export TCL_LIBRARY=/home/vinay/ns2/ns-allinone-2.27/tcl8.4.5/library

cd ns-2.27; ./validate
Note: The ns installation needs x-develop package. Otherwise, it will fail to build TCL TK.
Installation: A possible problem with CPP_NAMESPACE 
 ns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile,
 ns-2.27/indep-utils/webtrace-conv/nlanr/Makefile, and
 ns-2.27/indep-utils/webtrace-conv/dec/Makefile,
 needed to be modified in order to fix a bug in ISI's distribution. The bug
 caused a compile-time error that looked like this:
 g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o setdest.cc
 In file included from ../../../config.h:54,
 from setdest.h:5,
 from setdest.cc:57:
 ../../../autoconf.h:85: Error: namespace `CPP_NAMESPACE' undeclared
 setdest.cc:71:1: warning: "INFINITY" redefined
 In file included from /usr/include/math.h:40,
 from setdest.cc:43:
 /usr/include/bits/mathdef.h:35:1: warning: this is the location of the previous definition
 make[1]: *** [setdest.o] Error 1
 make[1]: Leaving directory `/home/iandow/netsim/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
 make[1]: Entering directory `/home/iandow/netsim/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
 To fix the bug, edit ns-2.27/indep-utils/cmu-scen-gen/setdest/Makefile and 
 change this line:
 DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@
 to this line:
 DEFINE = -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -DCPP_NAMESPACE=std
 In the other two makefiles, append -DCPP_NAMESPACE=std to CFLAGS.
 I discovered that fix by searching the NS news database[2] for
 "CPP_NAMESPACE".

ns2.34 in Fedora 8

Steps to Install ns2.34 in Fedora 8

Step 1:
Download ns-allinone-2.34.tar.gz from the following link
http://sourceforge.net/project/showfiles.php?group_id=149743&package_id=169689&release_id=684492

Step 2:
Execute the following commands to install ns2.34 from the terminal. You must login as root.

$cp ns-allinone-2.34.tar /opt/
$cd /opt/
$tar -xzf ns-allinone-2.34.tar.gz 
$cd ns-allinone-2.34
$./install

Step 3:
After a long wait and a whole lot of text, you should see the installation finish up with text like the following:

Please put /opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-2.34/tk8.4.18/unix into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /opt/ns-allinone-2.34/otcl-1.13, /opt/ns-allinone-2.34/lib, 
    into your LD_LIBRARY_PATH environment variable.
    If it complains about X libraries, add path to your X libraries 
    into LD_LIBRARY_PATH.
    If you are using csh, you can set it like:
                setenv LD_LIBRARY_PATH <paths>
    If you are using sh, you can set it like:
                export LD_LIBRARY_PATH=<paths>

(2) You MUST put /opt/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental variable. Otherwise ns/nam will complain during startup.

After these steps, you can now run the ns validation suite with
cd ns-2.34; ./validate

For trouble shooting, please first read ns problems page 
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive for related posts.
Step 4:
To change PATH environment & others execute following commands in terminal.

$cd /etc
$gedit ~/.bashrc &

Step 5:
Add following lines at the end of bashrc file.

# LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ns-allinone-2.34/otcl-1.13:/opt/ns-allinone-2.34/lib

# TCL_LIBRARY
export TCL_LIBRARY=$TCL_LIBRARY:/opt/ns-allinone-2.34/tcl8.4.18/library

# PATH
export PATH=$PATH:/opt/ns-allinone-2.34/bin:/opt/ns-allinone-2.34/tcl8.4.18/unix:/opt/ns-allinone-2.34/tk8.4.18/unix

Step 6:
To make the change in the path & others permanent, type the following command in terminal.
$ source ~/.bashrc 

You can check what is written in your path by writing
$echo $PATH 
$echo $LD_LIBRARY_PATH 
$echo $TCL_LIBRARY

Step 7:
Now, the installation has been completed. If you try:
$ns 

Then a "%" will appear on the screen. Type "exit" to quit the mode.
Step 8:
You can test/validate the installation by doing the following: [It is not necessary]
$cd /opt/ns-allinone-2.34/ns-2.34/
$./validate
Note that this validation takes a really long time. If it starts out ok, you probably have a good installation.

Step 9:
Simple ns2 Simulation program

$cd /opt/ns-allinone-2.34/ns-2.34/tcl/ex
$ns wireless-demo-csci694.tcl
$nam 694demo.nam

If output comes, then everything is ok :)

Testing:
Way 1:

$ns
%set ns [new Simulator]
%$ns at 1 "puts \"Hello World!\""
%$ns at 1.5 "exit"
%$ns run


Way 2:

Step 1: Create a file named sample.tcl & add the following lines in the file.
set ns [new Simulator]
$ns at 1 "puts \"Hello World!\""
$ns at 1.5 "exit"
$ns run

Step 2: Run the file by executing following command
$ns sample.tcl

Step 3: Output will be: Hello World!

Step 3: Output will be: Hello World!
Installation References

1. http://nsnam.isi.edu/nsnam/index.php/Downloading_and_installing_ns-2
2. http://ns2-experience.blogspot.com/2008/01/d-day-installing-ns2.html
3. http://mobicomclass.wordpress.com/2008/06/17/installing-ns-2-on-fedora-8/
Tutorial References

1. http://www.isi.edu/nsnam/ns/tutorial/

Installing DCCP patch in ns2.34

Step 1:
Copy dccp-ns2.34.patch in /opt/ns-allinone-2.34/ns-2.34 folder.

Step 2:
Open the terminal and go to /opt/ns-allinone-2.34/ns-2.34 folder and execute all the commands.
$cd /opt/ns-allinone-2.34/ns-2.34
$patch -p1 <dccp-ns2.34.patch
$./configure
$make clean
$make
DCCP Patch References

1. http://eugen.dedu.free.fr/ns2/
2. http://sourceforge.net/projects/dccp-ns/files/
3. http://mohittahiliani.blogspot.com/2010/05/dccp-patches-for-ns-2.html

Install ns2.33 in fedora 12

cd ns-allinone-2.33
./install 

sudo gedit ~/.bashrc 
#environment values for NS2/NAM
# LD_LIBRARY_PATH
OTCL_LIB=/your directory/ns-allinone-2.33/otcl-1.13
NS2_LIB=/your directory/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/your directory/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/your directory/ns-allinone-2.33/bin:/your directory/ns-allinone-2.33/tcl8.4.18/unix:/your directory/ns-allinone-2.33/tk8.4.18/unix
NS=/your directory/ns-allinone-2.33/ns-2.33/
NAM=/your directory/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM 

source ~/.bashrc
cd ns-2.33
./validate

ERROR
now i cleared ns in installation.when i type ns whereever in commandpropt i can get %. but i m struggling with nam.when i type nam i got instruction like following.
[code omitted because of length]
: no event type or button # or keysym
while executing
“bind Listbox {
%W yview scroll [expr {- (%D / 120) * 4}] units
}”
invoked from within
“if {[tk windowingsystem] eq “classic” || [tk windowingsystem] eq “aqua”} {
bind Listbox {
%W yview scroll [expr {- (%D)}] units
}
bind Li…”

what steps should be follow to rectify this inconvinent "ERROR"
Requirements : # yum install \
libX11-devel libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel \ 
gcc-c++ compat-gcc-34-c++ make automake autoconf libtool

There may be something more to install, depending on version.
ns-allinone-2.3x also requires tk-8.4-lastevent.patch :

http://bugs.gentoo.org/attachment.cgi?id=161242
cd ns-allinone-2.34/tk-8.4.18/

patch -p0 < tk-8.4-lastevent.patch

Assume ns-allinone-2.34.tar.gz presence in /home/<user-name>/
tar xvf ns-allinone-2.34.tar.gz && cd ns-allinone-2.34/
&& ./install

ns-allinone-2.35-RC6 can also be recommended :
http://www.isi.edu/nsnam/dist/releas....35-RC6.tar.gz
http://www.isi.edu/nsnam/dist/release/ns-allinone-2.35-RC6.tar.gz
QUOTE : 
ns-allinone-2.3x also requires the tk-8.4-lastevent.patch :
http://bugs.gentoo.org/attachment.cgi?id=161242
..

cd ns-allinone-2.33/tk-8.4.18/
patch -p0 < tk-8.4-lastevent.patch

And run ./install again : Only tk4.8.18 and nam-1.xx will change,
and you should now get a 'nam' that works_

tk-8.4-lastevent.patch.txt
http://www.linuxquestions.org/questions/attachment.php?attachmentid=4166&d=1279693038

collect all NS2 documents for download and study purpose

Tuesday, September 18, 2012

Easy steps for Ns2.34 installation with patch and documentation


-->





In short, these extensions aim to provide a more flexible and better integrated support for wireless and mobile networks and to support multi-* networks, that is networks where nodes may have multiple interfaces, possibly of different types, where nodes may communicate over multiple channels, where multiple routes to a destination may be available, where nodes may be interested in reaching a given resource/function/service rather than a specific node.

Examples of such networks include wireless mesh and sensors networks. These extensions provide a generic network layer architecture and a generic framework for implementing routing and forwarding protocols over one or more interfaces and regardless of their type.

All the new objects are integrated in the standard ns-2 Node. A unique object and layout is used regardless of the type of interfaces and the routing/forwarding protocols running on the node. Capabilities (e.g. mobility) are added to the standard ns-2 Node by means of modules.
Documentation

ns-2.34-q2s.20101208.patch

FAQ

How to apply a patch to ns-2.34

Move to ns-2.34 directory.
If you have already installed ns, run:
make distclean
Apply the patch and recompile ns:
patch -p1 < patch_file && ./configure && make
(Re-)Install ns: [Optional. ns is not installed by running the install script provided with ns-allinone.]
make install
To validate the installation, run:
./validate

Other resources

Patch for the dei80211mr library (1.1.4)

Download!
This patch enables to make use of the dei80211mr library (included in ns-allinone-2.34) once the extensions presented above have been installed. This patch also includes corrections of compilation warnings generated when the -Wall option is actually used.
The script q2s_infrastruct_rate_adaptation.tcl in q2s_test shows how to modify the simulation script infrastruct_rate_adaptation.tcl to use the new objects. Run test-infrastruct_rate_adaptation.sh to validate that the outputs of both scripts are equivalent.
Install:
cd path_to_dei80211mr-1.1.4
if [ -f Makefile ]; then make distclean; fi
patch -p1 <
patch_file
./configure --with-ns-allinone=`pwd | sed 's/\/dei80211mr-1.1.4//g'`
make && make install
chmod u+x q2s_test/test-infrastruct_rate_adaptation.sh

Patch for ns-Miracle (1.2.2)

Download!
This patch enables to compile ns-Miracle once the extensions presented above have been installed and the dei80211mr library has been patched. This patch also includes corrections of compilation warnings generated when the -Wall option is actually used.
Install:
cd path_to_nsmiracle-1.2.2
if [ -f Makefile ]; then make distclean; fi
mv mac802_11/802.11-module.cc tmp && awk '{sub("\r$", "");print}' tmp > mac802_11/802.11-module.cc
rm -f tmp
patch -p1 <
patch_file
./configure --with-ns-allinone=
path_to_ns-allinone
make && make install


_______________________________________________________________________________
                                                          end
+++++++++++++++++++++++++++++++++++++++++++++++++
Documentation:
  • the nsmiracle howto is probably the best place to start for people willing to use nsmiracle in their project
  • the nsmiracle doxygen documentation is the documentation generated from the comments in the source code, which is an useful reference when developing code using nsmiracle
  • this version of the nsmiracle/mini-HowTo, provides a guide for the installation of nsmiracle over ns 2.33 or higher; please note that dei80211mr libraries are already included in the standard ns distribution from version 2.33
  • the nsmiracle/dei80211mr mini-HowTo, ( although outdated ), still provides some useful tips for the installation of nsmiracle, especially for versions of ns <= 2.32 (this does not apply to versions 2.33 or higher) , for which the patch for dynamic libraries needs be applied

_______________________________________________________________________________

 Download Beta version: NS-MIRACLE 2.0 Beta

The NS-MIRACLE codebase is kept on a subversion repository. In particular, the development version of nsmiracle is available at this URL:

https://telecom.dei.unipd.it:/tlcrepos/nsmiracle-dev/trunk
The above mentioned subversion repository provides read-only access for guest users using the following account:

username: nsmiracle-dev-guest
password: nsmiracleguest
As an example, using the svn command line client you can check out the latest development version using the guest account by typing the following command and add in the path to be copied to at the trail of the command:


svn co --username nsmiracle-dev-guest --password nsmiracleguest https://telecom.dei.unipd.it:/tlcrepos/nsmiracle-dev/trunk

We will also be glad to provide read-write accounts to developers who make repeated contributions to nsmiracle.

___________________________________________________________________________

DESERT Underwater: an NS-Miracle-based framework to DEsign, Simulate, Emulate and Realize Test-beds for Underwater network protocols

DESERT Underwater is a complete set of public C++ libraries that extend the NS-Miracle simulator to support the design and implementation of underwater network protocols. Its creation stems from the will to push the studies on underwater networking beyond simulations. Implementing research solutions on actual devices, in fact, is of key importance to realize a communication and networking architecture that allows heterogeneous nodes to communicate reliably in the underwater environment.
See also the paper describing the library set.

The libraries can be downloaded from the DESERT Underwater web site.

DESERT Underwater v1.0.0 contains the following modules:

  • our implementation of four MAC protocols (CSMA-Aloha, DACAP, Tone-Lohi, UW-Polling) plus a plain version of Aloha;

  • USR, an error-controlled CSMA-Aloha version that uses selective repeat for static and mobile networks;

  • three routing modules (static routing, source routing for underwater networks (SUN), and our implementation of the Information-Carrying Based Routing (ICRP) protocol);

  • two transport modules, including end-to-end error control functions;

  • two application-level modules (for constant and variable bit rate traffic generation);

  • several mobility models for 3D underwater networks;

  • a module to interface the NS-Miracle simulator with acoustic modem hardware; this solution makes it possible to prototype protocols in real deployments, instead of just simulating them.

World Ocean Simulation System (WOSS)

WOSS is a multi-threaded framework that permits the integration of underwater channel simulation tools with network simulators. The present version hinges on Bellhop for computing acoustic propagation in terms of power-delay profiles, and feeds this data into the network simulator NS-Miracle, where physical-layer data are employed for providing a model of link performance.
WOSS provides a set of APIs to automatically feed Bellhop (or other propagation simulators) with all required environmental data (SSPs, bathymetry, bottom sediment geoacoustic coefficients, etc.), so that the user of the network simulator only has to specify the geographical location where the simulated network is operating.


Presently, WOSS takes the required environmental data from the following databases:

The WOSS library is available at the following URL:
http://telecom.dei.unipd.it/ns/woss
Credits: Federico Guerra



dei80211mr: an enhanced 802.11 implementation for ns2 and nsmiracle

The dei80211mr library – nicknamed ‘multirate’ for short – provides a 802.11 implementation for the Network Simulator Version 2. This implementations is derived from the 802.11 implementation included in NS 2.29 and aims at solving some known bugs as well as providing enhanced functionality.
The dei80211mr can be used with NS-Miracle as well as with the original ns2. A release of dei80211mr is included as part of official ns-allinone releases from version 2.33 above.
The following functionalities are provided by the dei80211mr library:
  • support for multiple PHY modes is included; in particolar, dei80211mr simulation of the different transmission rates, modulation and coding schemes defined in the IEEE802.11b/g standards.
  • a SINR-based packet level error model is introduced:
    • the RX Threshold variable which was used in the 802.11 implementation included in standard NS to determine successful receptions has been removed. Instead, Packet Error Rate (PER) is used to determine random packet losses.
    • PER is calculated using pre-determined curves (PER vs SINR and packet size); the curves can be specified by the user via TCL. Some default curves for both 802.11g and 802.11b are provided.
    • SINR is calculated using received signal strength, noise and interference
    • interference is calculated using a gaussian model to account for all transmissions which happen simultaneously to the one which is considered for reception
    • noise power is set via TCL
  • the capture model, i.e. the determination of whether a packet can be received when there are other concurrent transmissions are simultaneously ogoing, is now embedded in the above mentioned interference model (no more Capture Threshold)
  • Some well-known bugs of the 802.11 implementation in NS have been resolved. With reference to [1], we solved the following bugs:
    • direct access denial
    • random backoff time
    • capture model (note: this is different from the point above since, as per the description in [1], it is actually a synchronization issue)
  • In the wireless channel, the affected nodes distance is no more determined using the CS threshold, but we used a fixed value in meters (distInterference_) which can be set at the beginning of the simulation. The reason is that, since we use a gaussian interference model, nodes well below the CS threshold often still provide a non-negligible contribution to interference. The default value for the affected nodes distance (distInterference_) is very conservative, so that all nodes are considered for interference calculation. This default value therefore yields accurate but computationally intensive simulations. The value can be adjusted via TCL to achieve different trade-offs between computational load and simulation accuracy.
Credits: SIGNET lab: Federico Maguolo, Nicola Baldo, Simone Merlin, TS lab: Matteo Trivellato
Download dei80211mr
[1] Ilango Purushotaman and Sumit Roy, IEEE802.11 implementation Issues in Network Simulator 2



NS2 Simulation Code for Wireless Network Coding

The package below provides the random network coding modules for ns2.27.
ns2 Simulation Code for Wireless Network Coding
Network coding is a packet delivery scheme for distributed networks. It differs from the classical “receive and forward” paradigm as information packets are encoded at intermediate nodes in the network and subsequently forwarded according to a store, code, and forward approach. The strength of this strategy consists of the coding phase which improves the dissemination efficiency and reduces the number of transmissions required to deliver the data. Although network coding schemes require some data processing at intermediate nodes to code/decode packets, it has been proven that simple coding operations, e.g., linear coding, are sufficient to achieve close to optimal performance. Installation instructions and copyright notice are included in the above package.__________________________________________________________
UPDATES PROBLEM FOR  NS MIRACLE S
Problem:
/usr/bin/ld: cannot find -lMiracle collect2: ld returned 1 exit status
Solution:
install libtool package
$sudo apt-get install libtool

Error occured during "./configure" of addons:
1. configure: error: Could not find boost graph header files, please install the boost graph library.
Solution:
yum install -y boost-devel
yum install boost

Error occured during "make" of addons:
1. error:

/usr/include/boost/pending/relaxed_heap.hpp:102: error: 'CHAR_BIT' was not declared in this scope
Solution:
This is a bug in the standard header. Apparently, an include of is missing in that header. Adding the following header to the problematic code fix the problem.

#include // for CHAR_BIT
__________________________________________________


NSMIRACLE SVN repository Installation procedures:

1. Go to the "main" directory
command:
cd main
2. Execute the autogen.sh
command:
sh autogen.sh
3. Configure script will be generated and do the following:
command:
./configure --with-ns-allinone=/home/username/ns-allinone-2.33 --prefix=/home/username --disable-static --with-dei80211mr=/home/username/ns-allinone-2.33/dei80211mr-1.1.4
4. command:
make
5. command:
make install

NSMIRACLE ADDONS installation procedure:
1. Go to the "addons" directory and access to the addon need to be install
command:
cd addons
cd addontobeinstall
2. Execute the autogen.sh
command:
sh autogen.sh
3. Configure script will be generated and do the following:
command:
./configure --with-ns-allinone=/home/username/ns-allinone-2.33 --prefix=/home/username --disable-static --with-nsmiracle=/home/username/nsmiracledir/main
4. command:
make
5. command:
make install
____________________________________________________________________________________


nsmiracle/dei80211mr mini-HowTo

Index

  1. Introduction
  2. Requirements
  3. Installation
    1. ns-allinone with patch for dynamic libraries
    2. dei80211mr
    3. nsmiracle

1. Introduction

Here is a very brief tutorial for the installation of the nsmiracle and dei80211mr extensions for the NS simulator.
This tutorial has been written by Nicola Baldo — baldo at dei.unipd.it

2. Requirements

You need the following things:
  • the ns-allinone package. Version 2.31 can be downloaded here.
  • the patch for dynamic libraries in ns. You can download the patch for ns-allinone-2.31 from here (right-click and "save as").
  • the dei80211mr package, which can be found here.
  • the nsmiracle package, which can be found here.
Back to Index

3. Installation

We will now explain step-by-step the installation process. In this tutorial, we will assume that all downloaded packages have been put in the directory /locale/ns, as shown here below:
baldo@pcsignet08:/locale/ns$ ls -l
total 69820
-rw-r--r--  1 baldo dottor   363882 Apr 23 13:53 dei80211mr-1.0.tar.gz
-rw-r--r--  1 baldo dottor 70466306 Apr 17 19:45 ns-allinone-2.31.tar.gz
-rw-r--r--  1 baldo dottor   558144 Apr 23 13:53 nsmiracle-1.0.tar.gz
-rw-r--r--  1 baldo dottor    19681 Apr 17 19:46 patch-dl-ns-2.31
Furthermore, we assume that the user has write permission on the directory /locale/ns/ — this is needed e.g. to create the directory /locale/ns/lib in which dynamic libraries will be installed.
Of course, your mileage may vary — just adjust the paths to your needs.
Back to Index

3.1 ns-allinone with patch for dynamic libraries

Unpack the ns-allinone package:
baldo@pcsignet08:/locale/ns$ tar xzf ns-allinone-2.31.tar.gz
Apply the patch for dynamic libraries:
baldo@pcsignet08:/locale/ns$ patch -p0 < patch-dl-ns-2.31
patching file ns-allinone-2.31/ns-2.31/common/packet.cc
patching file ns-allinone-2.31/ns-2.31/common/packet.h
patching file ns-allinone-2.31/ns-2.31/common/ptypes2tcl.cc
patching file ns-allinone-2.31/ns-2.31/trace/cmu-trace.cc
patching file ns-allinone-2.31/ns-2.31/trace/cmu-trace.h
patching file ns-allinone-2.31/ns-2.31/tcl/lib/ns-default.tcl
patching file ns-allinone-2.31/ns-2.31/tcl/lib/ns-lib.tcl
patching file ns-allinone-2.31/ns-2.31/Makefile.in
Build NS:
baldo@pcsignet08:/locale/ns$ cd ns-allinone-2.31
baldo@pcsignet08:/locale/ns/ns-allinone-2.31$ ./install
The build process will generate a lot of output and will last something between 5 minutes and half an hour, depending on how fast is your hardware.
If the build process has been successful, you will see the following message:
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.14:      /locale/ns/ns-allinone-2.31/{bin,include,lib}
tk8.4.14:               /locale/ns/ns-allinone-2.31/{bin,include,lib}
otcl:           /locale/ns/ns-allinone-2.31/otcl-1.13
tclcl:          /locale/ns/ns-allinone-2.31/tclcl-1.19
ns:             /locale/ns/ns-allinone-2.31/ns-2.31/ns
nam:    /locale/ns/ns-allinone-2.31/nam-1.13/nam
xgraph: /locale/ns/ns-allinone-2.31/xgraph-12.1
gt-itm:   /locale/ns/ns-allinone-2.31/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

----------------------------------------------------------------------------------

Please put /locale/ns/ns-allinone-2.31/bin:/locale/ns/ns-allinone-2.31/tcl8.4.14/unix:/locale/ns/ns-allinone-2.31/tk8.4.14/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /locale/ns/ns-allinone-2.31/otcl-1.13, /locale/ns/ns-allinone-2.31/lib,
    into your LD_LIBRARY_PATH environment variable.
    If it complains about X libraries, add path to your X libraries
    into LD_LIBRARY_PATH.
    If you are using csh, you can set it like:
                setenv LD_LIBRARY_PATH 
    If you are using sh, you can set it like:
                export LD_LIBRARY_PATH=

(2) You MUST put /locale/ns/ns-allinone-2.31/tcl8.4.14/library into your TCL_LIBRARY environmental
    variable. Otherwise ns/nam will complain during startup.


After these steps, you can now run the ns validation suite with
cd ns-2.31; ./validate

For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
The above mentioned update of the environment variables PATH, LD_LIBRARY_PATH and TCL_LIBRARY is needed for the simulator to work. For the common case of bash users, the preferred way of accomplishing this is to edit the ~/.bashrc file. At this point we anticipate that later on we will need to add also /locale/ns/lib to LD_LIBRARY_PATH in order for the NS simulator to find the nsmiracle and dei80211mr libraries (cygwin users will need to add /locale/ns/bin to their PATH for the same purpose). We suggest to perform all this modifications now so that we need to edit ~/.bashrc only once.
A long story short, all you need to do is to add the following at the end of your ~/.bashrc:
export LD_LIBRARY_PATH=/locale/ns/ns-allinone-2.31/otcl-1.13:/locale/ns/ns-allinone-2.31/lib:/locale/ns/lib:$LD_LIBRARY_PATH
export PATH=/locale/ns/ns-allinone-2.31/bin:/locale/ns/ns-allinone-2.31/tcl8.4.14/unix:/locale/ns/ns-allinone-2.31/tk8.4.14/unix:/locale/ns/bin:$PATH
export TCL_LIBRARY=/locale/ns/ns-allinone-2.31/tcl8.4.14/library
Please note that the paths to be added vary according to the NS version you're installing; in all cases, stick to the path suggested by the message appearing at the end of the ns-allinone build. Furthermore, rember to reload ~/.bashrc on all open console sessions, so that the environment variables are updated:
baldo@pcsignet08:/locale/ns$ source ~/.bashrc
Now, check if the ns executable can be found:
baldo@pcsignet08:/locale/ns$ which ns
/locale/ns/ns-allinone-2.31/bin/ns
Finally, we need to test if NS can successfully run simulations. I personally suggest not to run the validate script suggested at the end of the NS build — it is a quite long process, and we can be satisfied with a much simpler test. Just download the ns-simple.tcl script, save it somewhere (e.g., in /locale/ns/) and run it:
baldo@pcsignet08:/locale/ns$ ns ns-simple.tcl
CBR packet size = 1000
CBR interval = 0.0080000000000000002
baldo@pcsignet08:/locale/ns$
If your ns installation was successful, the simulation will run correctly in a few seconds, and at the end the Network Animator (NAM) will pop up in a new window showing you a nice animation of what you simulated. If you're not familiar with ns, this is the good time to have a look at the NS by Example web page to understand NS basics.
If you had problems with your ns-2 installation, check out the ns-2 installation problems, bug fixes, and help page.
Back to Index

3.2 dei80211mr

Unpack the dei80211mr package and cd into the newly created directory:
baldo@pcsignet08:/locale/ns$ tar xzf dei80211mr-1.0.tar.gz
baldo@pcsignet08:/locale/ns$ cd dei80211mr-1.0
baldo@pcsignet08:/locale/ns/dei80211mr-1.0$
The build process follows the well-known ./configure; make; make install paradigm found in the vast majority of open source software. However we need to pass some additional parameters to ./configure:
  • --with-ns-allinone=<directory>, which is needed to make NS C++ header files (.h) available to the compilation of dei80211mr;
  • --prefix=<directory>, which is convenient so that the dei80211mr library will be installed in directory/lib;
  • --disable-static, which is convenient so that only dynamic libraries are built — we don't need static libraries since they cannot be used within NS, and we can just save the time by not building them.
For the test case we're considering, the build process of dei80211mr will then become the following. First we run configure, and we check the last lines of output:
baldo@pcsignet08:/locale/ns/dei80211mr-1.0$ ./configure --with-ns-allinone=/locale/ns/ns-allinone-2.31 --prefix=/locale/ns
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++

<a lot of output snipped here>

checking for ns-allinone installation... ok
checking if ns-allinone installation has been patched for dynamic libraries... yes
checking for tcl2c++... /locale/ns/ns-allinone-2.31/tclcl-1.19/tcl2c++
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/adt/Makefile
config.status: creating m4/Makefile
config.status: creating samples/Makefile
config.status: executing depfiles commands

please make sure that the last three checks have been succesful — if not, it's likely you have an error either in your NS installation or in the parameters passed to ./configure. Also remember to adapt all paths to your needs, unless you happen to use the same base path of this tutorial (/locale/ns).
You can now compile and install dei80211mr:
baldo@pcsignet08:/locale/ns/dei80211mr-1.0$ make

<a lot of compilation output here>

baldo@pcsignet08:/locale/ns/dei80211mr-1.0$ make install

<more output here... we report only the following message:>

----------------------------------------------------------------------
Libraries have been installed in:
   /locale/ns/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
The above reported message is just a warning: if you already added /locale/ns/lib to the LD_LIBRARY_PATH environment variable in your ~/.bashrc, as we suggested in section 3.1, then no further action is needed.
The installation of the dei80211mr library is now completed. You can run a sample simulation script to check if everything is OK:
baldo@pcsignet08:/locale/ns/dei80211mr-1.0$ cd samples
baldo@pcsignet08:/locale/ns/dei80211mr-1.0/samples$ ns adhoc_tcp.tcl
num_nodes is set 8
INITIALIZE THE LIST xListHead
 node 0 is at   X =  4.0954   Y =  1.9806
 node 1 is at   X =  8.6853   Y =  5.6842
 node 2 is at   X =  6.4658   Y =  9.0669
 node 3 is at   X =  1.5670   Y =  0.6503
 node 4 is at   X =  1.0323   Y =  3.3795
 node 5 is at   X =  7.1602   Y =  0.3843
 node 6 is at   X =  6.8063   Y =  8.6544
 node 7 is at   X =  8.3480   Y =  5.7466
SORTING LISTS ...DONE!
printing stats
 TCP throughput node 0 --> node 4 : 1224800.0 bps
 TCP throughput node 1 --> node 5 : 26400.0 bps
 TCP throughput node 2 --> node 6 : 1258400.0 bps
 TCP throughput node 3 --> node 7 : 991200.0 bps 

statsfile: /tmp/stats_4_10_Mode6Mb_10s.pcsignet08.log

Tracefile: /tmp/trace_4_10_Mode6Mb_10s.pcsignet08.tr
If you encounter some problems while building the dei80211mr library, you can refer to the nsmiracle-users mailing list.
Back to Index

3.3 nsmiracle

Unpack the nsmiracle package and cd into the newly created directory:
baldo@pcsignet08:/locale/ns$ tar xzf nsmiracle-1.0.tar.gz
baldo@pcsignet08:/locale/ns$ cd nsmiracle-1.0
baldo@pcsignet08:/locale/ns/nsmiracle-1.0$    
As we did for the dei80211mr package, we need to pass some additional parameters to ./configure:
  • --with-ns-allinone=<directory>, which is needed to make NS C++ header files (.h) available to the compilation of nsmiracle;
  • --prefix=<directory>, which is convenient so that the nsmiracle library will be installed in directory/lib;
  • --disable-static, which is convenient so that only dynamic libraries are built — we don't need static libraries since they cannot be used within NS, and we can just save the time by not building them.
  • --with-dei80211mr=<directory>, which enables the build of some nsmiracle extensions designed specifically for the dei80211mr library.
  • In this last case, <directory> is the path in which the dei80211mr package resides, e.g., /locale/ns/dei80211mr-1.0.
To summarize, the build process is almost identical to that of the dei80211mr package, with the only addition of the --with-dei80211mr switch. The commands to be executed are reported below:
baldo@pcsignet08:/locale/ns/nsmiracle-1.0$ ./configure --with-ns-allinone=/locale/ns/ns-allinone-2.31 --prefix=/locale/ns --disable-static --with-dei80211mr=/locale/ns/dei80211mr-1.0
baldo@pcsignet08:/locale/ns/nsmiracle-1.0$ make
baldo@pcsignet08:/locale/ns/nsmiracle-1.0$ make install
The same suggestions provided for the dei80211mr build process apply here — we summarize them here, somebody might have forgotten them ;-)
  • remember to adapt all paths to your needs, unless you're using /locale/ns.
  • make sure that the tests run by ./configure have been successful, in particular the tests for ns-allinone
  • after running make install, make sure that the path in which library have been installed is in your LD_LIBRARY_PATH environment variable.
If everything was OK, you will be able to run the provided sample simulation scripts, e.g.:
baldo@pcsignet08:/locale/ns/nsmiracle-1.0$ cd samples
baldo@pcsignet08:/locale/ns/nsmiracle-1.0/samples$ ns link_with_errors_cbr.tcl
Simulating........................................done!
Packet Error Ratio  :   0.050000
Throughput          :   68360.897567
Tracefile     : /tmp/link_with_errors_cbr.tcl.tr
baldo@pcsignet08:/locale/ns/nsmiracle-1.0/samples$ 
baldo@pcsignet08:/locale/ns/nsmiracle-1.0/samples$ 
baldo@pcsignet08:/locale/ns/nsmiracle-1.0/samples$ ns dei80211mr_infrastruct_plus_wired_voip.tcl
num_nodes is set 5
Simulating...done!

Tracefile     : /tmp/voip_wlan_infrastruct_wired.tr
Results file  : /tmp/stats_dei80211mr_infrastruct_plus_wired_voip.tcl_4_6Mbps.pcsensori03.log
_________________________________________________________________________


Technical description and documentation

WOSS - presented at WUWNet 2009
WOSS - presented at OCEANS 2009 Biloxi
Technical description
CHANGELOG

Installation Guidelines

Installation guidelines

WOSS source files

WOSS v1.3.3
WOSS v1.2.0 for DESERT compatibility
WOSS databases
WOSS reference manual (PDF version)

__________________________________________________

 

NS-MIRACLE Library: Multi InteRfAce Cross Layer Extension for NS

ns-miracle-doxygen-doc 

pdf 

Schematic Description of the Modules

nsmiracle-2.0-beta.tar.gz

_________________________________________________

MIRACLE docum


_________________________________________________________________________

Abstract:

All you have to know about main features of ns-MIRACLE in order to develop a simple project.





Sunday, September 9, 2012

List of bash command and with description, Linux command line Questions, Answers for Interview preparation



Linux command line Questions &Answers for Interview preparation


  1. You need to see the last fifteen lines of the files dog, cat and horse. What command should you use? tail -15 dog cat horse
    The tail utility displays the end of a file. The -15 tells tail to display the last fifteen lines of each specified file.
  2. Who owns the data dictionary?
    The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.
  3. You routinely compress old log files. You now need to examine a log from two months ago. In order to view its contents without first having to decompress it, use the _________ utility.
    zcat
    The zcat utility allows you to examine the contents of a compressed file much the same way that cat displays a file.
  4. You suspect that you have two commands with the same name as the command is not producing the expected results. What command can you use to determine the location of the command being run?
    which
    The which command searches your path until it finds a command that matches the command you are looking for and displays its full path.
  5. You locate a command in the /bin directory but do not know what it does. What command can you use to determine its purpose.
    whatis
    The whatis command displays a summary line from the man page for the specified command.
  6. You wish to create a link to the /data directory in bob’s home directory so you issue the command ln /data /home/bob/datalink but the command fails. What option should you use in this command line to be successful.
    Use the -F option
    In order to create a link to a directory you must use the -F option.
  7. When you issue the command ls -l, the first character of the resulting display represents the file’s ___________.
    type
    The first character of the permission block designates the type of file that is being displayed.
  8. What utility can you use to show a dynamic listing of running processes? __________
    top
    The top utility shows a listing of all running processes that is dynamically updated.
  9. Where is standard output usually directed?
    to the screen or display
    By default, your shell directs standard output to your screen or display.
  10. You wish to restore the file memo.ben which was backed up in the tarfile MyBackup.tar. What command should you type?
    tar xf MyBackup.tar memo.ben
    This command uses the x switch to extract a file. Here the file memo.ben will be restored from the tarfile MyBackup.tar.
  11. You need to view the contents of the tarfile called MyBackup.tar. What command would you use?
    tar tf MyBackup.tar
    The t switch tells tar to display the contents and the f modifier specifies which file to examine.
  12. You want to create a compressed backup of the users’ home directories. What utility should you use?
    tar
    You can use the z modifier with tar to compress your archive at the same time as creating it.
  13. What daemon is responsible for tracking events on your system?
    syslogd
    The syslogd daemon is responsible for tracking system information and saving it to specified log files.
  14. You have a file called phonenos that is almost 4,000 lines long. What text filter can you use to split it into four pieces each 1,000 lines long?
    split
    The split text filter will divide files into equally sized pieces. The default length of each piece is 1,000 lines.
  15. You would like to temporarily change your command line editor to be vi. What command should you type to change it?
    set -o vi
    The set command is used to assign environment variables. In this case, you are instructing your shell to assign vi as your command line editor. However, once you log off and log back in you will return to the previously defined command line editor.
  16. What account is created when you install Linux?
    root
    Whenever you install Linux, only one user account is created. This is the superuser account also known as root.
  17. What command should you use to check the number of files and disk space used and each user’s defined quotas?
    repquota
    The repquota command is used to get a report on the status of the quotas you have set including the amount of allocated space and amount of used space.

  List of bash command line and with description

  A-Z Index 

  alias    Create an alias •
  apropos  Search Help manual pages (man -k)
  apt-get  Search for and install software packages (Debian/Ubuntu)
  aptitude Search for and install software packages (Debian/Ubuntu)
  aspell   Spell Checker
  awk      Find and Replace text, database sort/validate/index
b
  basename Strip directory and suffix from filenames
  bash     GNU Bourne-Again SHell 
  bc       Arbitrary precision calculator language 
  bg       Send to background
  break    Exit from a loop •
  builtin  Run a shell builtin
  bzip2    Compress or decompress named file(s)
c
  cal      Display a calendar
  case     Conditionally perform a command
  cat      Concatenate and print (display) the content of files
  cd       Change Directory
  cfdisk   Partition table manipulator for Linux
  chgrp    Change group ownership
  chmod    Change access permissions
  chown    Change file owner and group
  chroot   Run a command with a different root directory
  chkconfig System services (runlevel)
  cksum    Print CRC checksum and byte counts
  clear    Clear terminal screen
  cmp      Compare two files
  comm     Compare two sorted files line by line
  command  Run a command - ignoring shell functions •
  continue Resume the next iteration of a loop •
  cp       Copy one or more files to another location
  cron     Daemon to execute scheduled commands
  crontab  Schedule a command to run at a later time
  csplit   Split a file into context-determined pieces
  cut      Divide a file into several parts
d
  date     Display or change the date & time
  dc       Desk Calculator
  dd       Convert and copy a file, write disk headers, boot records
  ddrescue Data recovery tool
  declare  Declare variables and give them attributes •
  df       Display free disk space
  diff     Display the differences between two files
  diff3    Show differences among three files
  dig      DNS lookup
  dir      Briefly list directory contents
  dircolors Colour setup for `ls'
  dirname  Convert a full pathname to just a path
  dirs     Display list of remembered directories
  dmesg    Print kernel & driver messages 
  du       Estimate file space usage
e
  echo     Display message on screen •
  egrep    Search file(s) for lines that match an extended expression
  eject    Eject removable media
  enable   Enable and disable builtin shell commands •
  env      Environment variables
  ethtool  Ethernet card settings
  eval     Evaluate several commands/arguments
  exec     Execute a command
  exit     Exit the shell
  expect   Automate arbitrary applications accessed over a terminal
  expand   Convert tabs to spaces
  export   Set an environment variable
  expr     Evaluate expressions
f
  false    Do nothing, unsuccessfully
  fdformat Low-level format a floppy disk
  fdisk    Partition table manipulator for Linux
  fg       Send job to foreground 
  fgrep    Search file(s) for lines that match a fixed string
  file     Determine file type
  find     Search for files that meet a desired criteria
  fmt      Reformat paragraph text
  fold     Wrap text to fit a specified width.
  for      Expand words, and execute commands
  format   Format disks or tapes
  free     Display memory usage
  fsck     File system consistency check and repair
  ftp      File Transfer Protocol
  function Define Function Macros
  fuser    Identify/kill the process that is accessing a file
g
  gawk     Find and Replace text within file(s)
  getopts  Parse positional parameters
  grep     Search file(s) for lines that match a given pattern
  groupadd Add a user security group
  groupdel Delete a group
  groupmod Modify a group
  groups   Print group names a user is in
  gzip     Compress or decompress named file(s)
h
  hash     Remember the full pathname of a name argument
  head     Output the first part of file(s)
  help     Display help for a built-in command •
  history  Command History
  hostname Print or set system name
i
  iconv    Convert the character set of a file
  id       Print user and group id's
  if       Conditionally perform a command
  ifconfig Configure a network interface
  ifdown   Stop a network interface 
  ifup     Start a network interface up
  import   Capture an X server screen and save the image to file
  install  Copy files and set attributes
j
  jobs     List active jobs •
  join     Join lines on a common field
k
  kill     Stop a process from running
  killall  Kill processes by name
l
  less     Display output one screen at a time
  let      Perform arithmetic on shell variables •
  ln       Make links between files
  local    Create variables •
  locate   Find files
  logname  Print current login name
  logout   Exit a login shell •
  look     Display lines beginning with a given string
  lpc      Line printer control program
  lpr      Off line print
  lprint   Print a file
  lprintd  Abort a print job
  lprintq  List the print queue
  lprm     Remove jobs from the print queue
  ls       List information about file(s)
  lsof     List open files
m
  make     Recompile a group of programs
  man      Help manual
  mkdir    Create new folder(s)
  mkfifo   Make FIFOs (named pipes)
  mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem
  mknod    Make block or character special files
  more     Display output one screen at a time
  mount    Mount a file system
  mtools   Manipulate MS-DOS files
  mtr      Network diagnostics (traceroute/ping)
  mv       Move or rename files or directories
  mmv      Mass Move and rename (files)
n
  netstat  Networking information
  nice     Set the priority of a command or job
  nl       Number lines and write files
  nohup    Run a command immune to hangups
  notify-send  Send desktop notifications
  nslookup Query Internet name servers interactively
o
  open     Open a file in its default application
  op       Operator access 
p
  passwd   Modify a user password
  paste    Merge lines of files
  pathchk  Check file name portability
  ping     Test a network connection
  pkill    Stop processes from running
  popd     Restore the previous value of the current directory
  pr       Prepare files for printing
  printcap Printer capability database
  printenv Print environment variables
  printf   Format and print data •
  ps       Process status
  pushd    Save and then change the current directory
  pwd      Print Working Directory
q
  quota    Display disk usage and limits
  quotacheck Scan a file system for disk usage
  quotactl Set disk quotas
r
  ram      ram disk device
  rcp      Copy files between two machines
  read     Read a line from standard input •
  readarray Read from stdin into an array variable •
  readonly Mark variables/functions as readonly
  reboot   Reboot the system
  rename   Rename files
  renice   Alter priority of running processes 
  remsync  Synchronize remote files via email
  return   Exit a shell function
  rev      Reverse lines of a file
  rm       Remove files
  rmdir    Remove folder(s)
  rsync    Remote file copy (Synchronize file trees)
s
  screen   Multiplex terminal, run remote shells via ssh
  scp      Secure copy (remote file copy)
  sdiff    Merge two files interactively
  sed      Stream Editor
  select   Accept keyboard input
  seq      Print numeric sequences
  set      Manipulate shell variables and functions
  sftp     Secure File Transfer Program
  shift    Shift positional parameters
  shopt    Shell Options
  shutdown Shutdown or restart linux
  sleep    Delay for a specified time
  slocate  Find files
  sort     Sort text files
  source   Run commands from a file `.'
  split    Split a file into fixed-size pieces
  ssh      Secure Shell client (remote login program)
  strace   Trace system calls and signals
  su       Substitute user identity
  sudo     Execute a command as another user
  sum      Print a checksum for a file
  suspend  Suspend execution of this shell •
  symlink  Make a new name for a file
  sync     Synchronize data on disk with memory
t
  tail     Output the last part of file
  tar      Tape ARchiver
  tee      Redirect output to multiple files
  test     Evaluate a conditional expression
  time     Measure Program running time
  times    User and system times
  touch    Change file timestamps
  top      List processes running on the system
  traceroute Trace Route to Host
  trap     Run a command when a signal is set(bourne)
  tr       Translate, squeeze, and/or delete characters
  true     Do nothing, successfully
  tsort    Topological sort
  tty      Print filename of terminal on stdin
  type     Describe a command •
u
  ulimit   Limit user resources •
  umask    Users file creation mask
  umount   Unmount a device
  unalias  Remove an alias •
  uname    Print system information
  unexpand Convert spaces to tabs
  uniq     Uniquify files
  units    Convert units from one scale to another
  unset    Remove variable or function names
  unshar   Unpack shell archive scripts
  until    Execute commands (until error)
  uptime   Show uptime
  useradd  Create new user account
  userdel  Delete a user account
  usermod  Modify user account
  users    List users currently logged in
  uuencode Encode a binary file 
  uudecode Decode a file created by uuencode
v
  v        Verbosely list directory contents (`ls -l -b')
  vdir     Verbosely list directory contents (`ls -l -b')
  vi       Text Editor
  vmstat   Report virtual memory statistics
w
  wait     Wait for a process to complete •
  watch    Execute/display a program periodically
  wc       Print byte, word, and line counts
  whereis  Search the user's $path, man pages and source files for a program
  which    Search the user's $path for a program file
  while    Execute commands
  who      Print all usernames currently logged in
  whoami   Print the current user id and name (`id -un')
  wget     Retrieve web pages or files via HTTP, HTTPS or FTP
  write    Send a message to another user 
x
  xargs    Execute utility, passing constructed argument list(s)
  xdg-open Open a file or URL in the user's preferred application.
  yes      Print a string until interrupted
  .        Run a command script in the current shell
  !!       Run the last command again
  ###      Comment / Remark
Commands marked • are bash built-ins, these are available under all shells.

to further know them using syntax search option .. click here