Depending on which distribution you are using the methods for installing the packages from the repository use different commands.
With Debian, Samba is generally installed with the Workstation or File Server configurations on installation.
For other distros, you may want to search the repositories for the package.
This link to an article, "Build a Samba File Server", may give you some insight:
http://http://www.melbpc.org.au/pcup...03article7.htm