Category Archives: Operating Systems

Windows : How to rename a power plan name

On Windows Vista/7, there is no GUI option to rename a power plan. You must use the “powercfg” command line utility to achieve this task. Open the command line (Start, Run – or type directly in the bottom search bar) : cmd Then, in the command prompt, type this command to list all power plan… Read More »

Zimbra : Initializing ldap…failed.

When installing and configuring Zimbra for the first time on RHEL/CentOS 6, it return that LDAP failed to initialize and then the config script exit. The log file probably indicate the following error : Initializing ldap… *** Running as zimbra user: /opt/zimbra/libexec/zmldapinitsudo: sorry, you must have a tty to run sudo IO::Socket::INET: connect: Connection refused… Read More »

Vim : how do I search and replace text

Do the following to find and replace text string in a whole file using the Vi text editor : 1. Enter in command mode by typing ” : ” 2. Your command should look like this : :%s/search_for_text/replace_with_this_text/g NOTE : To search & replace a string containing slashes ” / “, use a coma ”… Read More »

Linux : How to add a network static route

Here is the traditional way to set static route on Linux OS. route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 The best way to make it permanent, is to add the gateway directly to the interface by editing the interface script : /etc/sysconfig/networking/devices/ifcfg-eth0 add : GATEWAY=192.168.1.1 To remove a static route : route del -net… Read More »

Windows : Adding a permanent static route

Follow these steps to add a permanent static route to Windows. 1. Open the command prompt (must be done as administrator). 2. Enter the following command and replace with your network information : route -p add <NETWORK_IP> mask <NETMASK> <GATEWAY_IP> Let’s explain in details with the following IP information… assume we want to add a… Read More »