Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed samba sudo apt-get install samba.

then I made configuration but when i write :

sudo /etc/init.d/samba restart

message appears " command not found "

and when I write ls /etc/init.d I didn't find samba .

solutions tested :

sudo /etc/init.d/smbd restart

sudo /etc/init.d/nmbd restart

sudo service samba restart

and re-install samba

can you hint me please .

note : my os is ubuntu10.4 LTS

share|improve this question

sudo /etc/init.d/smbd restart

Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service smbd restart

Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the stop(8) and then start(8) utilities, e.g. stop smbd ; start smbd. The restart(8) utility is also available.

smbd stop/waiting

smbd start/running, process 7831

So the commands to start/stop samba:

sudo stop smbd

sudo start smbd
share|improve this answer

if you have installted samba package. you can find smbd, nmbd in the folder(/etc/init.d)

if not, it mean that your installation failed.

if yes, you can start the service via --

sudo /etc/init.d/smbd start
sudo /etc/init.d/nmbd start


sudo service samba start
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.