Sunday, July 4, 2010

How to change your mac address

ifconfig eth0 down
ifconfig eth0 hw ether ff:ff:ff:ff:ff:ff
ifconfig eth0 up

Saturday, July 3, 2010

overriding an alias:-

often we use an alias like this alias ls="ls -latr" sometimes you want to run ls without these arguments , what you need to do is execute ls as \ls

Thursday, July 1, 2010

How to install Gui in centos 5.3 ?

yum groupinstall "X Window System"
yum groupinstall "GNOME Desktop ENvironment"

how to find out the version of centos you are using ?

cat /etc/redhat-release

DNS cache cleaning

install nscd tool , make sure that it is running in the background as a daemon.to clear cache

In ubuntu if you want to flush DNS cache you need to restart nscd daemon

Install nscd using the following command

sudo aptitude install nscd

Flush DNS Cache in Ubuntu Using the following command

sudo /etc/init.d/nscd restart


why clear DNS cache ?

So if you have an invalid DNS entry cached on your local client you’ll need to flush it out of the cache so your client can do a new lookup and get the correct information. Or your other option is to wait until that DNS entry expires and the cache flushes it automatically… which typically takes about 24 hours.

make the command line you type invisible :-

to hide the user input to be displayed on screen, use the terminal line setting command stty -echo, whatever the user enters after this command will not be displayed in the screen. to make the input characters get displayed on the screen use stty echo

unixfool

If I were that worried about what the system would show based on CLI output, I'd either dump the results to file or /dev/null or wait until no one else is around to observe.