Sorry this is a little embarassing but I'm trying to set up my own server for the first time. I found great tutorial online.


I'm stuck at the 2nd to last line of step 4. Apparently there is no samba directory in init.d.

Why isn't there a samba directory in init.d?

Would the following work?

# sudo restart smbd
# sudo restart nmdb
  • 1
    If your # means you are logged in as superuser, then you don't need to run the commands with sudo, else the commands you mentioned are fine.
    – htorque
    Feb 5 '12 at 12:10
  • 1
    If you're embarrassed as a first timer, what does that make me when I've had a server running for years and needed this question :) Dec 18 '16 at 6:40


sudo service smbd start


sudo service smbd stop


sudo service smbd restart
  • 3
    Why not use the Upstart syntax like mentioned by the user?
    – htorque
    Feb 5 '12 at 12:09
  • 1
    Nothing wrong with it. I'm just lazy and sudo <start|stop|status|restart|reload> <job> is just shorter. ;)
    – htorque
    Feb 5 '12 at 18:55
  • @htorque I cant really remember why I made the recommendation like this also, maybe I seen something that ticked me off and I recommended this way, or its just my brain thinking about services all the time. Thx for the input! ;) Feb 5 '12 at 19:08
  • 2
    FYI, I had to use samba instead of smbd in my command line. Oct 31 '13 at 16:51
  • 1
    I am using Kali linux and I too, had to use samba instead of smbd Jul 29 '15 at 11:38

You can also do this way:


sudo /etc/init.d/smbd start


sudo /etc/init.d/smbd stop


sudo /etc/init.d/smbd restart

If you got an error, try using these commends this nmbd instead.

  • Is there any significant difference compared to "sudo service smbd xxx"? Oct 2 '20 at 19:28

Starting with 15.04 and systemd, the command is systemctl restart smbd

  • 3
    the service is smbd, not smdb
    – fireb86
    Mar 11 '18 at 15:01
  • +1 for updating an old question. But Ubuntu 15.04 was first version to use systemd. Mar 11 '18 at 21:41
  • Duh. Info online is so.. contradicting. I guess like it might be because back then it hadn't be a totally full 100% switch.
    – mirh
    Mar 13 '18 at 17:30
  • Is there any significant difference compared to "sudo service smbd xxx"? Oct 2 '20 at 19:29
  • Yes, a total one? Service is a command for System V systems afaik.
    – mirh
    Oct 3 '20 at 0:22

you may also try this :

check the name of the service:

service --status-all

restart the service

sudo service samba restart

On RHEL you start smb and nmb:

systemctl start smb
systemctl start nmb

Next, check if they started:

ps -elf | grep smbd
ps -elf | grep nmbd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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