1. 程式人生 > 實用技巧 >使用Ubuntu的公用資料夾輕鬆地在計算機之間共享檔案

使用Ubuntu的公用資料夾輕鬆地在計算機之間共享檔案

image

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共享時,公用資料夾沒有什麼特別的–右鍵單擊它,然後選擇屬性。 您將在屬性對話方塊中找到“共享”選項卡。

image

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並重新啟動桌面會話。

image

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之後,您可以輕鬆地共享資料夾,並將共享許可權設定為限制性的或隨意的。 啟用“允許其他人在此資料夾中建立和刪除檔案”和“訪客訪問”複選框,本地網路上的其他計算機將能夠輕鬆地將檔案新增到該資料夾​​,而無需輸入密碼。 選擇選項後,單擊建立共享按鈕。

image

Select Browse Network in Ubuntu’s file manager to view your network shares.

在Ubuntu的檔案管理器中選擇“瀏覽網路”以檢視您的網路共享。

image

個人檔案共享 (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

image

After you do, you’ll find the Personal File Sharing application in your Dash.

完成後,您將在Dash中找到“個人檔案共享”應用程式。

image

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.

使用“個人檔案共享”應用程式,可以通過網路輕鬆共享“公用”資料夾-它僅適用於“公用”資料夾,不適用於其他資料夾。 寫入檔案或訪問共享時,您永遠不需要密碼。 您還可以通過藍芽輕鬆共享和接收“公共”資料夾中的檔案。

image

Open the Network pane in the Nautilus file browser and you’ll see each Public folder shared on the network.

在Nautilus檔案瀏覽器中開啟“網路”窗格,您將看到網路上共享的每個公用資料夾。

image

翻譯自: https://www.howtogeek.com/116309/use-ubuntus-public-folder-to-easily-share-files-between-computers/