Thursday, January 23, 2014

watch command -n with fraction of seconds

I never know that watch command can run with fraction of seconds.

This is fun :)

watch -n .1 cat /proc/interrupts


Sunday, January 19, 2014

git user.name has multiple values


warning: user.name has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --set-all to change user.name.
[user@fc ~]$

[user@fc ~]$ cat ~/.gitconfig
remove the name here.

Add the new name in /etc/bashrc
[user@fc ~]$ vi /etc/bashrc
git config --global user.name "Firstname lastname"

[user@fc ~]$

Refer:

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup


To set email, use
$ git config --global user.email  "youname@yours.com"

To verify the results, use 
$ git config -l 




Friday, December 6, 2013

grub2 default entry

Update default entry in grub.

you need to modify

set default="4" in   /boot/grub2/grub.cfg

first check the entries and map it with numbers. first entry is default ="0".
change it according to requirement.


Friday, November 29, 2013

NAT , bridge mode in (libvirt) Virtual machine

http://superuser.com/questions/227505/what-is-the-difference-between-nat-bridged-host-only-networking


Same concept as the normal network setup:)
Host-Only: the VM will be assigned one IP, but it's only accessible by the box VM is running on. No other computers can access it.
IP not received by DHCP .  It is static. You will see another interface in host with same IP range as assigned to guest.
NAT: just like your home network with a wireless router, the VM will be assigned in a separate subnet, like 192.168.6.1 is your host computer, and VM is 192.168.6.3, then your VM can access outside network like your host, but no outside access to your VM directly, it's protected.
IP not received by DHCP.It is static. You will see another interface in host with same IP range as assigned to guest.

Bridge: you VM will be in the same network as your host, if you host IP is 172.16.120.45 and your VM will be like 172.16.120.50. It can be accessed by all computers in your host network.
IP  received by DHCP.

#networking #libvirt

Monday, November 25, 2013

centos and Fedora dual boot issue - Updated grub2



After installing both CENTOS  and Fedora 18, Centos  "disappeared" from Grub menu. Only Fedora 18 is bootable.

Then, able to restore Centos by issuing following commands.
#grub2-mkconfig -o /boot/grub2/grub.cfg
#grub2-install /dev/sda