How to restart Samba service on Ubuntu

This quick post shows how to restart Samba Service on Ubuntu.

Start

sudo service smbd start

Stop

sudo service smbd stop

Restart

sudo service smbd restart

 

In fact this should apply to more or less any service in Ubuntu.

When in doubt what services are running try this:

service –status-all

This will give you a list of all the services on the machine.
It looks something like this:

[ ? ] killprocs
[ ? ] kmod
[ ? ] libnss-ldap
[ + ] monit
[ ? ] networking
[ + ] nmbd
[ ? ] ondemand
[ – ] procps
[ ? ] rc.local
[ + ] resolvconf
[ – ] rsync
[ + ] rsyslog
[ + ] samba
[ – ] samba-ad-dc
[ ? ] screen-cleanup
[ ? ] sendsigs
[ + ] smbd
[ + ] ssh
[ – ] sudo

The legend for this is:

“+” = started
“-” = stopped
“?” = unknown

Why something is in status “unknown” I really do not know at the moment 🙁