{"id":157,"date":"2021-07-31T19:32:00","date_gmt":"2021-07-31T11:32:00","guid":{"rendered":"http:\/\/47.107.115.238\/?p=157"},"modified":"2024-09-25T15:24:31","modified_gmt":"2024-09-25T07:24:31","slug":"onedriver","status":"publish","type":"post","link":"https:\/\/lxylp.com\/?p=157","title":{"rendered":"onedriver"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/lxylp.com\/?p=157\/#introduction\" title=\"introduction\">introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/lxylp.com\/?p=157\/#Installation_jstafonedriver\" title=\"Installation jstaf\/onedriver\">Installation jstaf\/onedriver<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/lxylp.com\/?p=157\/#create_the_mountpoint_and_determine_the_service_name\" title=\"create the mountpoint and determine the service name\">create the mountpoint and determine the service name<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/lxylp.com\/?p=157\/#mount_onedrive\" title=\"mount onedrive\">mount onedrive<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/lxylp.com\/?p=157\/#login_your_account_here\" title=\"login your account here\">login your account here<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/lxylp.com\/?p=157\/#usage\" title=\"usage\">usage<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/lxylp.com\/?p=157\/#Installation_yann1ckonedrive\" title=\"Installation yann1ck\/onedrive\">Installation yann1ck\/onedrive<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/lxylp.com\/?p=157\/#Step_1_Update_etcaptsourceslist\" title=\"Step 1: Update \/etc\/apt\/sources.list\">Step 1: Update \/etc\/apt\/sources.list<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/lxylp.com\/?p=157\/#Step_2_Download_and_add_the_release_key\" title=\"Step 2: Download and add the release key\">Step 2: Download and add the release key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/lxylp.com\/?p=157\/#Step_3_Update_your_apt_package_cache\" title=\"Step 3: Update your apt package cache\">Step 3: Update your apt package cache<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/lxylp.com\/?p=157\/#Step_4_Install_%E2%80%98onedrive\" title=\"Step 4: Install \u2018onedrive\u2019\">Step 4: Install \u2018onedrive\u2019<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/lxylp.com\/?p=157\/#Step_5_config\" title=\"Step 5: config\">Step 5: config<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/lxylp.com\/?p=157\/#step6_usage\" title=\"step6 usage:\">step6 usage:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/lxylp.com\/?p=157\/#onedriver_for_business\" title=\"onedriver for business\">onedriver for business<\/a><\/li><\/ul><\/nav><\/div>\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"introduction\"><\/span>introduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>onedriver is a native Linux filesystem for Microsoft OneDrive.<\/strong><\/p>\n\n\n\n<p>onedriver is a network filesystem that gives your computer direct access to your files on Microsoft OneDrive. To your computer, there is no difference between using files on OneDrive and files on your local hard disk. onedriver isn\u2019t a sync client, but it comes with all of the best features of one.<\/p>\n\n\n\n<p>onedriver is extremely straightforwards to use:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install onedriver using your favorite installation method.<\/li>\n\n\n\n<li>Add one or more OneDrive accounts and select a mountpoint using the GUI (or via the command-line, I don\u2019t discriminate!).<\/li>\n\n\n\n<li>Just start using your files on OneDrive as if they were normal files.<\/li>\n<\/ul>\n\n\n\n<p>Ubuntu\/Pop!_OS\/Debian users can install onedriver from this <a href=\"https:\/\/launchpad.net\/~jstaf\/+archive\/ubuntu\/onedriver\">PPA<\/a>. Like the COPR install, this will enable you to install onedriver through your package manager and install updates as they become available.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installation_jstafonedriver\"><\/span>Installation jstaf\/onedriver<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo add-apt-repository ppa:jstaf\/onedriver\nsudo apt update\nsudo apt install onedriver<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"create_the_mountpoint_and_determine_the_service_name\"><\/span>create the mountpoint and determine the service name<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir OneDrive_hpu\n\nexport SERVICE_NAME=$(systemd-escape --template onedriver@.service --path ~\/OneDrive_hpu)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"mount_onedrive\"><\/span>mount onedrive<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>liupei@t:~<span class=\"katex math inline\">systemctl --user daemon-reload \n\nliupei@t:~<\/span> systemctl --user start $SERVICE_NAME<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"login_your_account_here\"><\/span>login your account here<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p># automatically mount onedrive when you login<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl --user enable $SERVICE_NAME<\/code><\/pre>\n\n\n\n<p># check onedriver\u2019s logs for the current day<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>journalctl --user -u $SERVICE_NAME --since today<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"usage\"><\/span><strong>usage<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>onedriver-loader, then select a folder<\/code><\/pre>\n\n\n\n<p>Ref. <a href=\"https:\/\/github.com\/jstaf\/onedriver\">jstaf<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installation_yann1ckonedrive\"><\/span>Installation yann1ck\/onedrive<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Update_etcaptsourceslist\"><\/span>Step 1: Update \/etc\/apt\/sources.list<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Add the following to the end of your <code>\/etc\/apt\/sources.list<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deb https:\/\/download.opensuse.org\/repositories\/home:\/npreining:\/debian-ubuntu-onedrive\/xUbuntu_20.04\/ .\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Download_and_add_the_release_key\"><\/span><strong>Step 2: Download and add the release key<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Download the \u2018Release.key\u2019 file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/download.opensuse.org\/repositories\/home:\/npreining:\/debian-ubuntu-onedrive\/xUbuntu_20.04\/Release.key<\/code><\/pre>\n\n\n\n<p>Add the \u2018Release.key\u2019 file to your apt key repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-key add .\/Release.key<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Update_your_apt_package_cache\"><\/span>Step 3: Update your apt package cache<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Install_%E2%80%98onedrive\"><\/span>Step 4: Install \u2018onedrive\u2019<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install onedrive<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_config\"><\/span><strong>Step 5: config<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>liupei@hpc:~$ onedrive\nConfiguring Global Azure AD Endpoints\nAuthorize this app visiting:\n\nhttps:&#47;&#47;login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize?client_id=d50ca740-c83f-4d1b-12c519384f0c&amp;scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&amp;response_type=code&amp;redirect_uri=https:\/\/login.microsoftonline.com\/common\/oauth2\/nativeclient\n\nEnter the response uri:<\/code><\/pre>\n\n\n\n<p>\u62f7\u8d1d\u5230\u6d4f\u89c8\u5668\uff0c\u7136\u540e\u628a\u8fd4\u56de\u8f93\u5165\u5230 uri\u4e2d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>liupei@hpc:~$ onedrive\nConfiguring Global Azure AD Endpoints\nAuthorize this app visiting:\n\nhttps:&#47;&#47;login.microsoftonline.com\/common\/oauth2\/v2.0\/authorize?client_id=d50ca740-c83f-4d1b-12c519384f0c&amp;scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.Read.All%20Sites.ReadWrite.All%20offline_access&amp;response_type=code&amp;redirect_uri=https:\/\/login.microsoftonline.com\/common\/oauth2\/nativeclient\n\nEnter the response uri: https:\/\/login.microsoftonline.com\/common\/oauth2\/nativeclient?code=M.R3_BAY.8cfc2048-46f0-102f-3d30-351d99c4f5\n\nApplication has been successfully authorised, however no additional command switches were provided.\n\nPlease use --help for further assistance in regards to running this application.<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"step6_usage\"><\/span>step6 usage:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>onedrive\nonedrive --synchronize \n\nonedrive --help \nonedrive --logout\nonedrive --monitor<\/code><\/pre>\n\n\n\n<p>\u53c2\u8003 [<a href=\"https:\/\/github.com\/abraunegg\/onedrive\/blob\/master\/docs\/ubuntu-package-install.md\">1<\/a>], [[2](https:\/\/itslinuxfoss.com\/how-to-install-and-use-onedrive-on-ubuntu-20-04\/#:~:text=Installing and Using OneDrive on Ubuntu 20.04 1,6 Run the OneDrive application. More items\u2026 )]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"onedriver_for_business\"><\/span>onedriver for business<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>microsoft team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>introduction one&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":481,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[10],"class_list":["post-157","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-10"],"_links":{"self":[{"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/posts\/157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lxylp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157"}],"version-history":[{"count":2,"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions"}],"predecessor-version":[{"id":482,"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/posts\/157\/revisions\/482"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lxylp.com\/index.php?rest_route=\/wp\/v2\/media\/481"}],"wp:attachment":[{"href":"https:\/\/lxylp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lxylp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lxylp.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}