{"id":10420,"date":"2020-07-05T14:12:15","date_gmt":"2020-07-05T14:12:15","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=10420"},"modified":"2020-07-05T14:12:15","modified_gmt":"2020-07-05T14:12:15","slug":"share-folder-smb-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2020\/07\/share-folder-smb-ubuntu-20-04\/","title":{"rendered":"How to Share A Folder via SMB\/CIFS Protocol in Ubuntu 20.04"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2016\/03\/classic-gnome-icon.png\" alt=\"gnome shell\" width=\"245\" height=\"250\" class=\"aligncenter size-full wp-image-5741\" \/><\/p>\n<p>This is a step by step beginner guide shows how to share a folder over local network via SMB\/CIFS protocol in Ubuntu 20.04 Gnome desktop.<\/p>\n<p><b>Share a folder in Ubuntu 20.04:<\/b><\/p>\n<p><b>1.)<\/b> First open terminal by pressing Ctrl+Alt+T on keyboard. When it opens, install samba, SMB\/CIFS file, print, and login server by running command:<\/p>\n<pre style=\"border:none;\">sudo apt install samba<\/pre>\n<p><i>Type user password (no asterisk feedback) and hit Enter to continue.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/apt-samba.png\" alt=\"\" width=\"520\" height=\"312\" class=\"aligncenter size-full wp-image-10421\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/apt-samba.png 520w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/apt-samba-450x270.png 450w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p><b>2.)<\/b> Open <b>Files<\/b> (Nautilus file browser) and right-click on the folder you want to share, then click on &#8220;<b>Local Network Share<\/b>&#8221; menu option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/localnetworkshare.png\" alt=\"\" width=\"520\" height=\"377\" class=\"aligncenter size-full wp-image-10422\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/localnetworkshare.png 520w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/localnetworkshare-450x326.png 450w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p><b>3.)<\/b> In next pop-up window, do:<\/p>\n<ul>\n<li>tick &#8220;Share this folder&#8221; to enable network sharing.<\/li>\n<li>(optional) tick &#8220;Allow others to create and delete files in this folder&#8221;<\/li>\n<li>(optional) tick &#8220;Guess access&#8221;<\/li>\n<li>finally click on &#8216;Create Share&#8217; button<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/folder-sharing.png\" alt=\"\" width=\"520\" height=\"298\" class=\"aligncenter size-full wp-image-10423\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/folder-sharing.png 520w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/folder-sharing-450x258.png 450w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p><b>4.)<\/b> Confirm write permission (if enabled) and done!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/add-permissions.png\" alt=\"\" width=\"450\" height=\"177\" class=\"aligncenter size-full wp-image-10428\" \/><\/p>\n<p><b>5.)<\/b> If you want remote PC to type <code>username<\/code> and <code>password<\/code> to access the shared folder, open terminal (Ctrl+Alt+T) and run command:<\/p>\n<pre style=\"border:none;\">sudo smbpasswd -a USERNAME<\/pre>\n<p><i>Note:The \u201cUSERNAME\u201d must be an existing user in your Ubuntu. It\u2019s <code>ji<\/code> in my case. And set a password for remote smb access only.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/add-smbuser.png\" alt=\"\" width=\"520\" height=\"153\" class=\"aligncenter size-full wp-image-10425\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/add-smbuser.png 520w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/add-smbuser-450x132.png 450w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p>Before getting access from remote PC, you may check out the IP address and \/ or hostname by running commands:<\/p>\n<pre style=\"border:none;\">hostname\r\n\r\nip -4 address<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/check-hostname-ip.png\" alt=\"\" width=\"450\" height=\"178\" class=\"aligncenter size-full wp-image-10427\" \/><\/p>\n<p><b>Access the share folder from remote computer:<\/b><\/p>\n<p>1. To access from <b>Windows PC<\/b>, go to <b>Start -> Run<\/b> to bring up Run command window. Type either <code>\\\\ip-address\\<\/code> or <code>\\\\hostname\\<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/windows-access.png\" alt=\"\" width=\"454\" height=\"283\" class=\"aligncenter size-full wp-image-10429\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/windows-access.png 454w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/windows-access-450x281.png 450w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/><\/p>\n<p>2. To access from another <b>Ubuntu<\/b> desktop, go to <b>Files -> Other Locations<\/b>, then type either <code>smb:\/\/ip-address\/SHARE_FOLDER<\/code> or <code>smb:\/\/hostname\/SHARE_FOLDER<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/nautilus-smb.png\" alt=\"\" width=\"450\" height=\"146\" class=\"aligncenter size-full wp-image-10426\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>This is a step by step beginner guide shows how to share a folder over local network via SMB\/CIFS protocol in Ubuntu 20.04 Gnome desktop. Share a folder in Ubuntu 20.04: 1.) First open terminal by pressing Ctrl+Alt+T on keyboard. When it opens, install samba, SMB\/CIFS file, print, and login server by running command: sudo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1828],"class_list":["post-10420","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-share-over-lan"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/10420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=10420"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/10420\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=10420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=10420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=10420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}