0% found this document useful (0 votes)
25 views7 pages

How To Set Up Samba in Ubuntu - Linux, and Access It in Mac OS and Windows - Adrian Mejia Blog

Uploaded by

lonesome.rar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views7 pages

How To Set Up Samba in Ubuntu - Linux, and Access It in Mac OS and Windows - Adrian Mejia Blog

Uploaded by

lonesome.rar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog

 

Home Trending Popular About Blog

Coding

How to set up Samba in


Ubuntu/Linux, and access it in Mac
OS and Windows
 Last updated July 12th 2011  375.3k 12 Comments  productivity

Samba allows to share files and printers with other computers remotely, regardless
their operating system (linux, windows, Mac, ...). This guide show how to intall and
configure the Samba service in a Ubuntu machine and access it through windows
and mac.

Setting up the Samba File Server on Ubuntu/Linux:

1. Open the terminal


https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 1/7
1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog

2. Install samba with the following command: sudo apt-get install samba
smbfs
3. Configure samba typing: vi /etc/samba/smb.conf
4. Set your workgroup (if necesary). Go down in the file, until you see :

# Change this to the workgroup/NT-domain name your Samba server will p


workgroup = WORKGROUP

5. Set your share folders. Do something like this (change your path and comments)

# Adrian's share
[MyShare]
comment = YOUR COMMENTS
path = /your-share-folder
read only = no
guest ok = yes

6. Restart samba. type: /etc/init.d/smbd restart


7. Create the share folder: sudo mkdir /your-share-folder
8. Set the permissions: sudo chmod 0777 /your-share-folder
9. you are all set in ubuntu

Accessing Samba Server Files from:


Mac OS

1. Open finder
2. Menu Go -> Connect to server (command-k)
3. In the "Server Address" textbox, type: smb://<your-ip-address-to-ubuntu>
4. Connect
5. Select guest and OK
6. Your all set, you'll be able to see /<your-share-folder> from here.

Windows

1. Start button -> Run


2. Type: \\<your-ip-address-to-ubuntu>\<your-share-folder>
3. All set

If you need to enable the samba ports in your firewall these are the ports:
https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 2/7
1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog

port type port no


udp 137
udp 138
tcp 139
tcp 445

 NEWER OLDER 
Faster Windows XP removing What technologies are using the most
Msmpeng.Exe and other programs influential Internet companies?

Subscribe & stay up to date!

email address

Subscribe

About the author

https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 3/7
1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog

Adrian Mejia is a Software Engineer located in Boston, MA.


Currently working at Google. Adrian enjoys writing posts about
Algorithms, programming, JavaScript, and Web Dev. Also, he likes
to travel ✈️ and biking 🚴‍.

Follow @iAmAdrianMejia

 Top  Edit this post

Contents

ALSO ON ADRIAN MEJIA'S BLOG

6 years ago • 10 comments 6 years ago • 4 comments


Getting started How can
with Node.js developers
modules: … reduce stress

https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 4/7
1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog

12 Comments 
1 Login

G Join the discussion…

LOG IN WITH OR SIGN UP WITH DISQUS ?

Name

 5 Share Best Newest Oldest

John Adams − ⚑
4 years ago

This has to be the worst tutorial EVER!! Seriously! There's like 100+ settings in Samba and if one is
wrong then nothing works. This dopey idiot should be fired!!

5 2 Reply ⥅

Clay Richard − ⚑
C 4 years ago

This tutorial makes invalid assumptions on the knowledge of the reader. It is by no means a guide
for newbies.

2 1 Reply ⥅

Ashok Kumar − ⚑
AK 3 years ago

We are accessing Linux samba server shared folder from windows system. When we are listing a
files names through dir command it came in random order. Is there any setting in samba server to
get this in proper sequence? please hel

1 0 Reply ⥅

Halima Fadde − ⚑
HF 5 years ago

i get an error message when i want access Samba Server Files from windows

1 0 Reply ⥅

Rene − ⚑
R 4 years ago

Good Tutorial, one of the simplest tutorials to setup samba on Linux out there, it gets you 95%
there. The only clarification I would make is this :

To Setup Windows 10 to access Linux Share:


1. You need to make sure you can access SMB as guest from windows 10. Follow this link:
https://technoresult.com/fi...
https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 5/7
1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog
p
2.Restart your windows PC
3. Lookup the -exact- name of your Linux Box Server providing the samba share drive, look in your
Linux file manager, it should now show up under "Network"
something like this: "smb://music-desktop.local"
4. From your windows explorer address box type: smb:\\
<your.exact.computer.name.as.listed.in.linux>\<share folder="">

0 0 Reply ⥅

Rene > Rene − ⚑


R 4 years ago

Sorry should be <share folder=""> at the end.

0 0 Reply ⥅

Rene > Rene − ⚑


R 4 years ago

I don't why this app is adding the ""=, sorry.

0 0 Reply ⥅

Tinesh − ⚑
T 5 years ago

Hi by doing this will I get to see the name of the pc that gives print job on the printjob monitor list ?

0 0 Reply ⥅

Fred Frigo − ⚑
6 years ago

Excellent, clear, helpful - had no problem setting up Ubuntu 18.04 with Windows 10.

0 0 Reply ⥅

Dart Gar − ⚑
D 6 years ago

I am trying to access a drive installed on Router. How can I use Samba to do so please help and
thank you so much?

0 0 Reply ⥅

Henry − ⚑
H 10 years ago

Hi, I found solution, just create samba user. See the following link
http://www.andyibanez.com/m...

0 0 Reply ⥅

© 2022 Adrian Mejia v.rk61qc

https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 6/7
1/10/25, 9:50 AM How to set up Samba in Ubuntu/Linux, and access it in Mac OS and Windows | Adrian Mejia Blog

https://adrianmejia.com/how-to-set-up-samba-in-ubuntu-linux-and-access-it-in-mac-os-and-windows/ 7/7

You might also like