windows to add static route rule

windows to add static route rule

1. Open Command Prompt

2. At the command prompt, type:
route add destination mask subnetmask gateway metric costmetric if interface

Specifies either an IP address or host name for the network or host.

Specifies a subnet mask to be associated with this route entry. If subnetmask is not specified, is used.

Specifies either an IP address or host name for the gateway or router to use when forwarding.

Assigns an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used.

Specifies the interface to be used for the route that uses the interface number. If an interface is not specified, the interface to be used for the route is determined from the gateway IP address.

For example, to add a static route to the network that uses a subnet mask of, a gateway of, and a cost metric of 2, you type the following at a command prompt:
route add mask metric 2

• To open command prompt, click Start, point to All Programs, point to Accessories, and then click Command Prompt.

• To make a static route persistent, you can either enter route add commands in a batch file that is run during system startup or use the -p option when adding routes.

• Routes added by using the -p option are stored in the Windows registry under the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters\PersistentRoutes

• All symbolic names used for destination or gateway are looked up in the network and computer name database files (Networks and Hosts), which are stored in the local systemroot\System32\Drivers\Etc folder.

• If a route addition fails, you can use the tracert command to verify that the gateway specified is directly reachable from the same subnet as this computer.



Burn CD from Command Line

想由命令列來執行燒錄 CD 或 DVD 的動作。可使用「wodim」、「cdrecord」兩者其中一個來達成。

將 ISO 檔燒錄成 CD 的操作命令如下:

sudo cdrecord -v speed=20 dev=/dev/sr0  pfSense-1.2-RC3-LiveCD-Installer.iso

sudo wodim -v speed=20 dev=/dev/sr0  pfSense-1.2-RC3-LiveCD-Installer.iso 

若要查詢更完整的說明及使用方法可以用「man wodim」得知。

command-line restart ibus

如果遇上了 ibus 不聽使喚的時候,該如何讓它重新啟動呢?

Ubuntu 目前較新發行版都使用 ibus 當作預設的輸入法的服務,但是有時它會當掉, 並且無法由圖形介面重新啟動它,此時可以在 Terminal 直接執行以下的指令讓它重新啟動。

重新啟動 ibus:

jerry@jerry-P5Q:~$ pkill ibus-daemon |nohup ibus-daemon -d

上面的動作是殺掉 ibus-daemon 並重新啟動它,不管 Terminal 是否被關閉都不會關掉 ibus-daemon。