Where is initdb in Ubuntu

Personally I think you would be better off sticking with the Ubuntu specific commands, pg_lsclusters, pg_dropcluster, and pg_createcluster. These wrapper functions handle all of the filesystem layout pieces, and call initdb where necessary. It's not that you can't use the direct commands, but I've seen a lot of people get in to problems where they bypassed pieces of the regular ubuntu/debian config and then ran into problems when certain assumptions weren't met. You have a packaging solution, take advantage of it.


http://ubuntuforums.org/showthread.php?t=694887 suggests you want to be looking in /usr/lib/postgresql/$postgres_version/bin where you should also find createdb, createuser and similar, if you need them.

Substitute your postgres version as appropriate, obviously!

(As a more general tip: locate initdb would probably have furnished you with the answer. I don't have an Ubuntu machine with PG installed to check either the answer or this fact, though!)