Tips & Tricks

Grep in colour
Grep can use colours to highlight the matching text using the –color parameter

grep –color=auto

I found this tip at:

Set NIC on 100MB Full Duplex permanently

# ethtool -s eth0 speed 100 duplex full autoneg off
To make it persistant you can add the above line in init.d scripts or in startup script like /etc/rc.local
Alternatively add the below entry in /etc/sysconfig/network-scripts/ifcfg-eth0

ETHTOOL_OPTS=”speed 100 duplex full autoneg off”

On Ubuntu Linux Follow the below steps:

On Ubuntu Linux just create a script as follows:
# vi /etc/init.d/100Mbs
Append following lines:
SPEED=”100 duplex full”
case “$1” in
echo -n “Setting eth0 speed 100 duplex full…”;
$ETHTOOL -s $DEV speed $SPEED;
echo ” done.”;;
exit 0

Save and close the file. Setup executable permission:
# chmod +x /etc/init.d/100Mbs
Now run script when Debian or Ubuntu Linux boots up. Use update-rc.d command install System-V style init script links:# update-rc.d 100Mbs defaults

Adding system startup for /etc/init.d/100Mbs …
/etc/rc0.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc1.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc6.d/K20100Mbs -> ../init.d/100Mbs
/etc/rc2.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc3.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc4.d/S20100Mbs -> ../init.d/100Mbs
/etc/rc5.d/S20100Mbs -> ../init.d/100Mbs

Reboot the system to take effect or just type scrit name:
# /etc/init.d/100Mbs start

I'm happy to use Increase Sociability.