OneDrive 官方不支持 Linux,用开源项目 abraunegg/onedrive 同步微软 365 文件,附安装、登录与配置方法。
onedrive官方并没有提供linux平台的支持。但在github上有一个可以使用onedrive的仓库。配置起来相对简单,还能让我的Microsoft 365发挥他的价值。
1. 安装
2. 登录
根据提示进行操作
3. 配置onedrive
根据文档进一步的配置
文档中的部分内容
获取配置文件
1
| wget https://raw.githubusercontent.com/abraunegg/onedrive/master/config -O ~/.config/onedrive/config
|
非文档内容
systemd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| [Unit]
Description=OneDrive Client for Linux
After=network.target NetworkManager.service systemd-networkd.service iwd.service
[Service]
Type=simple
LimitNPROC=500
LimitNOFILE=1000000
Restart=always
ExecStartPre=/usr/bin/sleep 1s
ExecStart=/usr/local/bin/onedrive --sync
[Install]
WantedBy=multi-user.target
|
需要代理可以增加以下内容
1
2
| Environment="HTTP_PROXY=http://your.proxy.server:port"
Environment="HTTPS_PROXY=http://your.proxy.server:port"
|