You’ve probably noticed that Ubuntu comes with a Public folder in your home directory. This folder isn’t shared by default, but you can easily set up several different types of file-sharing to easily share files on your local network.
您可能已经注意到,Ubuntu在主目录中带有一个Public文件夹。 此文件夹默认情况下不共享,但是您可以轻松设置几种不同类型的文件共享,以轻松共享本地网络上的文件。
This folder was originally meant for the Personal File Sharing tool, which is no longer included with Ubuntu by default. You can install the Personal File Sharing tool or use Ubuntu’s built-in file-sharing feature to share files.
该文件夹原本是用于个人文件共享工具的,默认情况下它不再包含在Ubuntu中。 您可以安装个人文件共享工具,也可以使用Ubuntu的内置文件共享功能来共享文件。
桑巴分享 (Samba Sharing)
Ubuntu’s built-in file-sharing tool uses Samba, which is interoperable with Windows. Windows PCs on the local network will be able to view your shared folder if you share it this way.
Ubuntu的内置文件共享工具使用Samba,可与Windows互操作。 如果以这种方式共享,则本地网络上的Windows PC将能够查看您的共享文件夹。
To share the Public folder – or any other folder, there’s nothing special about the Public folder when it comes to Samba sharing – right-click it and select Properties. You’ll find a Share tab in the properties dialog.
要共享公用文件夹–或任何其他文件夹,在涉及Samba共享时,公用文件夹没有什么特别的–右键单击它,然后选择属性。 您将在属性对话框中找到“共享”选项卡。
Share a folder and you’ll be prompted to install the Samba software. Click the Install service button and follow the prompts to install Samba and restart your desktop session.
共享一个文件夹,系统将提示您安装Samba软件。 单击“安装服务”按钮,然后按照提示安装Samba并重新启动桌面会话。
After you’ve installed Samba, you can easily share the folder and set the sharing permissions as restrictive or as permissive as you want them to be. Enable the Allow others to create and deletes files in this folder and Guest access check boxes and other computers on the local network will be able to easily add files to the folder without entering a password. Click the Create Share button after selecting your options.
安装Samba之后,您可以轻松地共享文件夹,并将共享权限设置为限制性的或随意的。 启用“允许其他人在此文件夹中创建和删除文件”和“访客访问”复选框,本地网络上的其他计算机将能够轻松地将文件添加到该文件夹,而无需输入密码。 选择选项后,单击创建共享按钮。
Select Browse Network in Ubuntu’s file manager to view your network shares.
在Ubuntu的文件管理器中选择“浏览网络”以查看您的网络共享。
个人文件共享 (Personal File Sharing)
The Personal File Sharing tool – also known as gnome-user-share – was the original reason for the Public folder. It uses Apache to offer convenient WebDAV-based file sharing, but doesn’t work with Windows systems. It supports Bluetooth file sharing, too. To use it, you’ll have to install the appropriate packages:
个人文件共享工具(也称为gnome-user-share)是公用文件夹的最初原因。 它使用Apache提供方便的基于WebDAV的文件共享,但不适用于Windows系统。 它也支持蓝牙文件共享。 要使用它,您必须安装适当的软件包:
sudo apt-get install gnome-user-share apache2.2-bin libapache2-mod-dnssd
须藤apt-get install gnome-user-share apache2.2-bin libapache2-mod-dnssd
After you do, you’ll find the Personal File Sharing application in your Dash.
完成后,您将在Dash中找到“个人文件共享”应用程序。
With the Personal File Sharing application, you can enable easy sharing of your Public folder over the network – it only works with the Public folder, not other folders. You can require a password never, when writing files, or whenever the share is accessed. You an also enable easy sharing and receiving of files in the Public folder over Bluetooth.
使用“个人文件共享”应用程序,可以通过网络轻松共享“公用”文件夹-它仅适用于“公用”文件夹,不适用于其他文件夹。 写入文件或访问共享时,您永远不需要密码。 您还可以通过蓝牙轻松共享和接收“公共”文件夹中的文件。
Open the Network pane in the Nautilus file browser and you’ll see each Public folder shared on the network.
在Nautilus文件浏览器中打开“网络”窗格,您将看到网络上共享的每个公用文件夹。
翻译自: https://www.howtogeek.com/116309/use-ubuntus-public-folder-to-easily-share-files-between-computers/