Creating a share folder in terminal

Like the title. How do we create a shared folder in the terminal. Preferable a samba share for Windows. Right now I’m using thunar-shares-plugin but I would like to know a terminal alternative.

Hello @Mixalis1987 :wink:

I would say, this way it should work for only your user account:

  1. copy the smb.conf to your home folder:
cp /etc/samba/smb.conf $HOME/smb.conf 
  1. edit the file. Here is a example template for a share:
[<folder_name>]
path = /home/<user_name>/<folder_name>
available = yes
valid users = <user_name>
read only = no
browsable = yes
public = yes
writable = yes
  1. Set a password for your user:
sudo smbpasswd -a <user_name>
  1. restart the samba service after editing the smb.conf:
sudo systemctl restart smb.service
1 Like

Thank you. I will give that a test run when I can and let you know the result. So it looks like to create a share folder it needs to be made in the conf file.