Xcode install command via OS X Terminal
The command line install works on much newer OS than yours - the tutorial you link is 10.10 and Xcode 6 or 7.

If you can't upgrade to 10.6.8 and then get past Lion, I would suggest run the graphical installer and look for Xcode possibly in /Developer if you don't see it in the /Applications folder.