Friday, September 24, 2010

how to find router ip address for any router of any OS

type tracert google.com from commandline

For example as in Ubuntu:

The first IP address is your computer's IP. 10.1.1.1 is the router's IP

Saturday, September 18, 2010

/etc/hosts file format

The format of /etc/hosts is:

How to find out the format?
type man 5 hosts in terminal

why 5?
5 is the section number of a man page, it means file formats
ref:http://en.wikipedia.org/wiki/Man_page



Extra:

The etc/hosts file specifies the hostname or computer name your current shell is running.
In my case, my computer name is zhang-laptop and my login name is zhang, so my bash looks like:

zhang@zhang-laptop:~$

And my etc/host file is:
zhang@zhang-laptop:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 zhang-laptop
    #added
    #127.0.0.2    domainhound
    #127.0.0.2    zhangmichael.com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

how do you file the hosts file format?


Ref:
http://www.freebsd.org/doc/handbook/configtuning-configfiles.html
http://www.freebsd.org/cgi/man.cgi?query=hosts&sektion=5