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

Saturday, February 11, 2012

Task bar in ubuntu 11.10 using tint2

I started to use ubuntu 11.10 but i faced a problem that is absence of taskbar . Taskbar is not available with unity desktop.

So i google out the things and got "tint2" .

install tint2
            $ sudo apt-get install tint2

setup tint2 in startup program
            goto  control (right upper most widget ) ---> startup application 


and fill the entry
                  name        :  tint2
         command      :  tint2
click on add . Restart your computer and enjoy the taskbar...
for more help



 here at bottom we have the tasskbar..

happy coding... :) B-)

Linux file system

Many of us which are new to linux, usually get confused between linux and windows file system. Because Linux has completely different file structure than windows. Linux has its file system rooted to '/'  and each sub folder for some specific job and they have special meaning.

Yesterday I found a very good blog that explains the file system of linux and  objective of each sub directories and their location too.

Linux file system hierarchy 
good blog to understand Linux file system

It help me a lot to understand the file system. hope this will help you in journey of linux.

-- enjoy coding

Thursday, February 2, 2012

Firefox 10 for Ubuntu !!!! (released yesterday)

here we can get latest version of firefox....

add the repository of firefox
#sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa
 
update it
#sudo apt-get update
 
install firefox
#sudo apt-get install firefox
 
enjoy coding... :) B-)

Wednesday, February 1, 2012

some basic command of git

adding user name
#git config --global user.name "Trinity"

set email address
#git config --global user.email "trinity@gmail.com"

.gitconfig file in home folder will contain above information

creating clone of project :
#git clone <link>

to see history of project
#git log

creating a project

create folder for project
#mkdir Trinity

#cd Trinity

#git init


to check the status
#git status

to commit the modification

#git commit -m 'msg'

to add files to track
#git add .

to see last commit
#git show

Working with git

when i build git from its source then i tried to clone a project then i face a problem  :

" fatal : Unable to find remote helper for 'https' "

actually it require curl and expat support.

remove the previous git
#apt-get remove git-core

install the git with new source with support of curl and expat
#tar -zxvf git-1.x.x.tar.gz
#cd git-1.x.x
#./configure --with-curl --with-expat
#make
#make install


now we can enjoy git without any error....


Enjoy Coding.. :) B-)

Monday, January 23, 2012

Command to know information for partation..

list partition
                      $fdisk -l 

disk space usage:
                      $df -h     or       $df -k

display mount point :
                      $mount

quickly mount all file system present in /etc/fstab
                       $mount -a

File system mount points and other information present in /etc/fstab

Saturday, January 14, 2012

Scapy - Easy packet generation

Scapy is a python command based packet generation tool. It help to create packet very easily. It has full control over protocol stack. We can alter all the bits in the packet and modify any packet according to our wish.

installing scapy:
                          $ wget scapy.net
                          $ unzip scapy-latest.zip
                          $ cd scapy-2.*
                          $ sudo python setup.py install

starting scapy:
                         $ scapy



Documentation present at : www.dirk-loss.de/scapy-doc/Scapy.pdf


Sample code: [ICMP packet generation ]
                     
root@bt:~# scapy
WARNING: No route found for IPv6 destination :: (no default route?)
Welcome to Scapy (2.1.0)
>>> a= ICMP()
>>> b= IP()
>>> c=Ether()
>>> d=c/b/a

>>> d.display()
###[ Ethernet ]###
  dst= ff:ff:ff:ff:ff:ff
  src= 00:00:00:00:00:00
  type= 0x800
###[ IP ]###
     version= 4
     ihl= None
     tos= 0x0
     len= None
     id= 1
     flags=
     frag= 0
     ttl= 64
     proto= icmp
     chksum= None
     src= 127.0.0.1
     dst= 127.0.0.1
     \options\
###[ ICMP ]###
        type= echo-request
        code= 0
        chksum= None
        id= 0x0
        seq= 0x0
>>> send (d)       // sending the packet d into network


## send () is used when we are injecting packet at layer3.
and if we want to send packet with modification at layer 2 entry then we will use sendp() to send packet.
otherwise we will get a warning message. 
      >>> send(ether/ip/icmp)
WARNING: Mac address to reach destination not found. Using broadcast.
.
Sent 1 packets.


for more information

enjoy coding.. :) B-)

Saturday, August 13, 2011

installing arp-sk

arp-sk is basically an ARP Traffic Generation Tool. It’s quite old but still very useful! There are 2 basics mode:
– who-has: build a request ARP message.
– reply: build a reply ARP message (default)

download arp-sk from
http://sid.rstack.org/arp-sk/

it works on libnet 1.1. you can download it from:
http://linux.softpedia.com/get/Programming/Libraries/Libnet-10275.shtml

to install libnet 1.1.2.1
1. $tar xvzf libnet-1.1.2.1.tar.gz
2. $./configure
3. $make & make install

to install arp-sk
1. $tar xzvf arp-sk-0.0.16.tgz
2. $cd arp-sk
3. $./configure
4. $make & make install

use arp-sk
$arp-sk <mode> <option>

for more help

Wednesday, August 10, 2011

Telnet server

Telnet offers users the capability of running programs remotely and facilitates remote administration. Telnet is available for practically all operating systems and eases integration in heterogeneous networking environments.

 so to start it you must have telnetd  deamon (ubuntu user)
#apt-egt install telnetd

 (fedora user)
# yum install telnet-server telnet

we can find its configuration file at
    /etc/inetd.conf

remove comment from this file and make following line look like this:
 /usr/libexec/telnetd telnetd

enable inetd service so that telnet get loaded
#vi /etc/rc.conf

add
inetd_enable="YES"

Restart telnet
#/etc/init.d/xinetd restart

to check configuration of telnet
# chkconfig telnet on

for more help








 

  


Wednesday, July 20, 2011

FTP server in Linux

Linux comes with various type of ftp server:
                  proftpd
                  vsftpd
                  ftpd
                  wu-ftpd
                  pure-ftpd

i tried vsftpd

so first of all you have to install it on your computer
#sudo apt-get install vsftpd

you can find its configuration file at  /etc/vsftpd.conf
if you want to change something in this file you can change
#vi /etc/vsftpd.conf

you will get lot of option there like
       local_enable=YES
remove comments from the option that you want to use

if u want to enable upload a file on your server
          write_enable=YES

if u want to restrict user to their home directories
          chroot_local_user=YES

start your FTP server
#/etc/initd/vsftpd restart

at ftp client to connect to server type:
#ftp 10.100.98.91

if you want some help then type help to know command to work on FTP..

to get more help  

working of FTP