Install OneDrive Free Client on Gentoo without Root Permission

OneDrive Free Client is “a complete tool to interact with OneDrive on Linux”.

Install the D language compiler:

curl -fsS | bash -s dmd

Run the full source command provided by the output of the above install script.

Download OneDrive Free Client’s source:

git clone

Change to the source directory:

cd onedrive

Use the following command to edit the prefix defined in Makefile:

sed -i 's|/usr/local|/home/username|g' Makefile

Compile and install OneDrive Free Client:

make && make install

Deactivate the source command:


Add ~/bin to your PATH so that you can run binaries in ~/bin without specifying the path. Ignore this step if you have performed it for a different program.

echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc

You can now run OneDrive Free Client with onedrive. To run it in the background, you can use:

screen -dmS onedrive onedrive -m

Run the following command to create a sync list, which let onedrive only syncs specific directories:

vi ~/.config/onedrive/sync_list

In sync_list (one directory per line):


Leave a Reply

Your email address will not be published. Required fields are marked *