The easiest way to upgrade from Fedora 17 to Fedora 18 by the terminal, is do to it with fedup. Fedup goes for Fedora Upgrader.
All you have to do is to upgrade your fedup to the latest version, like this:
$ sudo yum --enablerepo=updates-testing install fedup
Next, if only you have a good internet connection, do this:
$ sudo fedup-cli --network 18 --debuglog fedupdebug.log
Now, the only thing you have to do next, is to wait for the upgrade to finish.