
Ubuntu One lets you easily synchronize files and folders, but it isn’t clear how to sync configuration files. Using Ubuntu One’s folder synchronization options or some symbolic links, you can synchronize configuration files?across?all your computers.
Ubuntu One使您可以輕松地同步文件和文件夾,但是不清楚如何同步配置文件。 使用Ubuntu One的文件夾同步選項或某些符號鏈接,您可以在所有計算機之間同步配置文件。
The same method should work with other cloud storage synchronization programs, including Dropbox. It also creates an online backup of your important files, so it’s useful even if you don’t have multiple Ubuntu systems.
相同的方法應適用于其他云存儲同步程序,包括Dropbox。 它還會創建重要文件的在線備份,因此即使您沒有多個Ubuntu系統,它也很有用。
Ubuntu One安裝 (Ubuntu One Setup)
If you haven’t set up Ubuntu One yet, you’ll have to set it up before synchronizing files. Click the mail icon on the panel and select “Ubuntu One.”
如果尚未設置Ubuntu One,則必須在同步文件之前進行設置。 單擊面板上的郵件圖標,然后選擇“ Ubuntu One” 。

Click the “Join Now” button and create an account.
點擊“立即加入”按鈕并創建一個帳戶。

On your other computers, click the “I already have an account!” link and sign in with your existing account.
在其他計算機上,單擊“我已經有一個帳戶! ”鏈接并使用您現有的帳戶登錄。
After you do this, you’ll get a “Ubuntu One” folder in your home folder. All files in this folder are?automatically?synchronized between your computers.
完成此操作后,您將在主文件夾中找到一個“ Ubuntu One”文件夾。 此文件夾中的所有文件將在計算機之間自動同步。
同步配置文件夾 (Synchronizing Configuration Folders)
Configuration folders are hidden by default, so you’ll have to click the View menu in the file manager and select “Show Hidden Files” to see them.
默認情況下,配置文件夾是隱藏的,因此您必須單擊文件管理器中的“查看”菜單,然后選擇“顯示隱藏的文件”以查看它們。

Once you have, you’ll see your?configuration?files. Each begins with a . — this is how files and folders are hidden on Linux.
擁有之后,您將看到您的配置文件。 每個以開頭。 —這就是在Linux上隱藏文件和文件夾的方式。

Right-click the folder you want to synchronize, point to the Ubuntu One submenu and click “Synchronize This Folder.”
右鍵單擊要同步的文件夾,指向Ubuntu One子菜單,然后單擊“同步此文件夾” 。

A green check mark appears on each folder you’re synchronizing.
一個綠色的復選標記出現在您正在同步的每個文件夾上。

From the Ubuntu One window, you can view all your synchronized folders.
在Ubuntu One窗口中,您可以查看所有同步的文件夾。

Before the folder will synchronize, you’ll have to open the Ubuntu One configuration window on your other computers.
在文件夾同步之前,您必須在其他計算機上打開Ubuntu One配置窗口。

You must enable the “Sync locally?” check box on each other computer.
您必須啟用“本地同步? 對方計算機上的”復選框。

Ubuntu One will keep the configuration folder in sync?across?all your computers.
Ubuntu One將使配置文件夾在所有計算機上保持同步。

Of course, you can use this method to synchronize any folder.
當然,您可以使用此方法來同步任何文件夾。
同步單個文件 (Synchronizing Individual Files)
Ubuntu One won’t let you synchronize a single file from the right-click menu. If you try, you’ll see all the options grayed out.
Ubuntu One不允許您從右鍵單擊菜單同步單個文件。 如果嘗試,您會看到所有選項均灰顯。

To synchronize a specific configuration file, you’ll have to move it to your Ubuntu One folder. You can do this with the cut and paste option from the file manager or with the mv command in the terminal.
要同步特定的配置文件,您必須將其移動到Ubuntu One文件夾。 您可以使用文件管理器中的剪切和粘貼選項或終端中的mv命令來執行此操作。
Here, we’ve moved our .bashrc file to the Ubuntu One folder. It no longer exists in our home folder.
在這里,我們已將.bashrc文件移至Ubuntu One文件夾。 它不再存在于我們的主文件夾中。

We can use the ln -s command to create a symbolic link from the file in the Ubuntu One directory to the file’s original location. For our .bashrc example, we’d use the following command:
我們可以使用ln -s命令創建從Ubuntu One目錄中的文件到文件原始位置的符號鏈接。 對于我們的.bashrc示例,我們將使用以下命令:
ln -s /home/howtogeek/Ubuntu\ One/.bashrc /home/howtogeek
ln -s / home / howtogeek / Ubuntu \ One / .bashrc / home / howtogeek
In other words, the syntax is:
換句話說,語法為:
ln -s /path/to/file /original/location
ln -s /路徑/到/文件/原始/位置
Note that you can’t create a symlink and place it in the Ubuntu One directory. Ubuntu One ignores symlinks.
請注意,您無法創建符號鏈接并將其放置在Ubuntu One目錄中。 Ubuntu One忽略符號鏈接。

If you check your home folder after this, you’ll see that there’s now a symbolic link to the file in the Ubuntu One folder.
如果在此之后檢查您的主文件夾,您將看到在Ubuntu One文件夾中現在有一個指向該文件的符號鏈接。

On your other computers, you’ll have to delete the original configuration file and run the same command to create the appropriate symlink.
在其他計算機上,您將必須刪除原始配置文件并運行相同的命令來創建適當的符號鏈接。

You can use this method to synchronize any file at any location. Most of the time it will make more sense to copy the file to the Ubuntu One folder, though.
您可以使用此方法在任何位置同步任何文件。 不過,在大多數情況下,將文件復制到Ubuntu One文件夾更有意義。
翻譯自: https://www.howtogeek.com/108000/how-to-synchronize-your-configuration-files-with-ubuntu-one/