Answers:
此说明遵循RCLONE-Microsoft OneDrive
sudo apt install rclone
或下载最新的
wget https://downloads.rclone.org/v1.42/rclone-v1.42-linux-amd64.deb
sudo apt install ./rclone-v1.42-linux-amd64.deb
rclone config
通过输入并按以下 键,选择“ 新建远程”选项 :nEnter
$ rclone config
Current remotes:
Name Type
==== ====
mega mega
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
输入新遥控器的名称,此处onedrive
使用:
name> onedrive
按下后Enter,将显示受支持的云存储服务列表。您需要通过输入相应的数字来选择Microsoft OneDrive选项(现在为“ 16”,但将来可能会更改):
Type of storage to configure.
Choose a number from below, or type in your own value
[snip]
...
...
xx / Microsoft OneDrive
\ "onedrive"
...
...
[snip]
Storage> onedrive
在接下来的两个步骤中,请按Enter而不输入任何信息,因为无需输入Microsoft App Client ID或Secret:
Microsoft App Client Id
Leave blank normally.
client_id>
Microsoft App Client Secret - leave blank normally.
client_secret>
选择OneDrive帐户类型(输入 b
Business或p
Personal OneDrive帐户):
Remote config
Choose OneDrive account type?
* Say b for a OneDrive business account
* Say p for a personal OneDrive account
b) Business
p) Personal
b/p> p
根据您的设置,您必须输入自动配置或手动进行下一步。对于桌面用户,键入y 以使用自动配置:
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> y
应在默认的Web浏览器中打开一个新选项卡,要求您授予Rclone访问OneDrive帐户的权限。允许它,您可以关闭选项卡。
Rclone在本地计算机上(端口53682上)运行Web服务器以检索身份验证令牌。如果使用防火墙,则可能需要暂时取消阻止它。
现在,您需要检查一切是否正确,并通过输入来保存设置y:
[onedrive]
type = onedrive
client_id =
client_secret =
token = {"access_token":"GoKSt5YMioiuCWX1KOuo8QT0Fwy+Y6ZeX7M","token_type":"bearer","refresh_token":"7OMvoEAO3l*8BbhS2AMxpTbJW0Y6np9cdql!bwEdYAhJ6XBG0tnR0UK","expiry":"2018-07-26T15:15:13.696368366+03:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
输入q以下内容以退出Rclone配置:
Current remotes:
Name Type
==== ====
onedrive onedrive
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
mkdir ~/OneDrive
rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive
您可以通过按Ctrl+ c 关闭Rclone 来停止和卸载它。
要在启动时安装OneDrive,请打开“启动应用程序”,然后在“启动应用程序”中单击“添加”。
单击添加后,使用以下命令:
Name: Rclone OneDrive Mount
Command: sh -c "rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive"
还有其他自动安装OneDrive的方法,例如在/etc/fstab file
,使用systemd等中添加一行。
rclone lsd <your drive name>: