LPI Invents Linux Commands
It would appear that in order to obtain Linux Professional Institute’s LPIC-2 certification, one needs to know real Linux commands as well as imaginary ones. On the Sample Questions page for LPIC-2 Exam 2 the LPI Linux gurus pose the following question:
What command is typically used to manually change the default gateway used by your TCP/IP networking device? (Please enter only the command without options, paths or arguments)
The “correct” answer, to my great surprise, is “FITB” (see screenshot). As in Fill In The Blank. Nice answer. Have they developed a flavor of Linux in Canada we are not aware of? We will need to investigate this further. In the meantime, you may want to put your LPIC-2 aspirations on hold: surely LPI can invent commands faster than you can memorize them.
But, if you just want to change your Linux machine’s default gateway, here are a few better ideas than typing “FITB” into the shell window. Depending on Linux flavor, the default gateway information is stored in a flat file usually in /etc/sysconfig. It may be /etc/sysconfig/network or /etc/sysconfig/network/routes. On Solaris it is /etc/defaultrouter.
Here’s a sample default router configuration from a SLES 11 system:
|
1 2 |
icebox:/ # cat /etc/sysconfig/network/routes default 192.168.122.1 - - |
The “- -” portion means that this is the default route for all NICs in your system. You can also set a separate route for each NIC by replacing the last “-” with the NIC logical name (i.e. “eth0″). After making changes to the “network” or “routes” file, you will need to restart your network service.
You can also set default route by using the “route” command:
|
1 |
route add default gw 192.168.122.1 eth0 |
-
unbleevable39
-
Miguel M
-
Jeremy Xargor is my gamertag
-
dealy
-
stephen m
