On ubuntu 10.04 I know how to share the /media folder by right clicking the /media folder in nautilus, going to sharing options and click "share this folder".

How can I do that from a command prompt in terminal?