I don't know if Samba is pre-installed in my Linux system.

I have the /etc/samba/ directory, with smb.conf file. But if I try one of these commands

sudo service smb start
sudo service samba start
sudo service smbd start

the answer is always unrecognized service.

In /etc/init.d there is no file like smb, samba or smbd. How could I check anymore?

Thank you anyway!

4 Answers 4


The easier way is to check with your package manager. dpkg, yum, emerge, etc. If that doesn't work, you just need to type samba --version and if it's in your path it should work. Lastly you can use find / -executable -name samba to find any executable named samba. If those test are negative, is highly probable that you don't have samba installed.

  • The commands relevant for the current Fedora release (25) are rpm --query samba, dnf list installed samba, smbd --version, and find /usr/sbin/ -executable -name smbd. The command to check the service is systemctl status smb.
    – Bob
    May 29, 2017 at 13:46

In SMB version 4.11.6-Ubuntu, run the following command:

systemctl status smbd
  • Thanks for this alternative and suitable way. Note that sudo is not necessary.
    – BowPark
    Mar 4, 2021 at 9:54
  • sudo is not required. Jun 13, 2022 at 14:11
  • @user311086 It's funny that I can't edit your answer as it requires changing more than 6 characters and removing sudo is just 5 characters. Jun 14, 2022 at 19:30

Use the smbstatus command

you see below. version 3.6.23-14.el6_6 and status of you samba process and user, group etc...

  • 3
    Can you give some example, recommendations, etc. Jul 7, 2017 at 13:59

There is an even easier way to check for installed programs. You can check for any installed program by typing:

~$ which [program]

So in this case

~$ which samba

If it is installed, it gives you the location of it. If it isn't, you get an empty output.

  • 1
    That won't work in this case as there's no file named samba. which smbd would show if the server is installed -- but only if /usr/sbin is in the user's PATH. May 30, 2017 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .