AI Generated image using Jasper - depicting a penguin to represent Linux based articles.

Samba Shared Drive/Folder

Samba is a software package that allows linux computers to share files and printers with other computers on a network, regardless of whether those other computers are running linux, Windows, or macOS. Samba is an important tool for networking linux computers with other types of computers, and can be especially useful in mixed-platform environments.

Introduction to Samba:

Samba is a Linux program that will give the Linux operating system the ability to host, and also provide access to, Windows shared drives (or folders). This is essential when a data-center uses both Windows and Linux terminals. Without this program computers will not be able to communicate cross-platform.

Verifying Samba has been installed on Linux:

By default Samba may not be installed on your version of Linux. At the time of this article Ubuntu does not include this program on their computers. Ubuntu may change this in the future. Linux Distributions are generally light weight and thus will not include many programs you wish it would already have installed on it.

Steps to verifying Samba install on Linux:

  • Open Terminal by pressing Ctrl + Alt + T all at the same time.
    • Or press the ‘Show Applications’ button on your taskbar and type in ‘Terminal’
  • In the Terminal window type in the command below:
    • sudo apt list | grep samba

Installing Samba:

First Samba will need to be installed onto the Ubuntu system in order for the ability to create, and access, shared folders.

  • In Terminal type in sudo apt-get install samba to install Samba from the Ubuntu repositories.

Also check out this article for Windows computers:

User access to a Shared Drive/Folder on the Local Network:

To access a shared folder from another Ubuntu system first:

  • Open a folder
  • select “Other Connections”
  • Type in “SMB://Server IP Address” in the “Connect to Server” field on the bottom of the window
  • Example: SMB://192.168.1.120
  • press “Enter”
  • Enter User Credentials
  • Now Right-Click on the folder path at the top of the folder and select “Add to Bookmarks” and this will add a bookmark or shortcut to access the Shared Folder for ease of access.

Samba Terminal Commands

Some basic commands to control Samba

  • sudo service smbd status
    • This will display the status of Samba.
  • sudo service smbd stop
    • This will stop the service. Can be useful if you have multiple users and something goes wrong.
  • sudo service smbd start
    • This will start the program.
  • sudo service smbd restart
    • will stop then start the program. If Samba is having issues sometimes it will need to be restarted.
  • whereis samba
    • Displays the location the program is installed at.
  • sudo apt-get remove samba
    • Will remove the program from the Ubuntu computer.

Steps to Create a Shared Folder in Ubuntu

1. In Ubuntu, open the file manager and navigate to the location where you would like to create your shared folder.

2. Right-click on an empty area of the window and select “Create New Folder” from the context menu.

3. Give your new folder a name and click “OK”.

4. Now, right-click on your new folder and select “Properties” from the context menu.

5. Click on the “Permissions” tab and check the “Allow others to create and delete files in this folder” option and click “OK”.

6. Your new folder is now ready to be used as a shared folder. To access the shared folder from another computer, simply follow the steps at the beginning of this chapter.

Similar Posts