I installed bitcoin core in windows 10 using ( Windows Subsystem for Linux ) . I installed ubuntu from the store and I used it to Install bitcoin core. The thing is everything was installed in the main hard disk C and it doesn't have enough space to download blocks. Is there a way to copy it to another partition (D partition because it has enough space) ? or while running bitcoind is there any way to run it with a specified path?

Ps: I hope the question is clear

Thank you


2 Answers 2


Make sure to stop bitcoind with bitcoin-cli stop, then move your data directory to a new folder and add the following line to your bitcoin.conf:


This file should be somewhere in C:\Users\username\AppData\Roaming\Bitcoin\bitcoin.conf in Windows and ~/.bitcoin/bitcoin.conf in Linux.

As the user AntMor replied, you can also pass this configuration every time you run bitcoind.

  • Thank you Pedro! I will try it.. Just when I write datadir=path/to/new/directory instead of directory I shoud give the path to my directory, right? And if I do this whenever I run bitcoind it will be run in the directory I gave right? Thanks a lot
    – saadia
    Commented Dec 18, 2019 at 19:04
  • yes, make sure the directory exists and you will notice new files being created as soon as bitcoind starts running. When you run df -h on the command line what do you get?
    – Pedro
    Commented Dec 18, 2019 at 19:07
  • when İ run df -h I get this Filesystem Size Used Avail Use% Mounted on rootfs 223G 216G 7.2G 97% / none 223G 216G 7.2G 97% /dev none 223G 216G 7.2G 97% /run none 223G 216G 7.2G 97% /run/lock none 223G 216G 7.2G 97% /run/shm none 223G 216G 7.2G 97% /run/user C: 223G 216G 7.2G 97% /mnt/c D: 932G 113G 820G 13% /mnt/d
    – saadia
    Commented Dec 19, 2019 at 7:22
  • so for d partition I can use this path /mnt/d ?
    – saadia
    Commented Dec 19, 2019 at 7:27
  • yes, try to move the data folder to somewhere in /mnt/d , run bitcoind as root (sudo bitcoind ...) just in case to make sure you have permissions.
    – Pedro
    Commented Dec 19, 2019 at 12:34

You need to run bitcoind with a different -datadir parameter. This is, all the blockchain data is under a folder (binaries and database files from LevelDB). What you need to do is something like the following:

/path-to-bitcoin/bitcoind -datadir=/path-to-directory/
  • Thank you for your answer! How can I find the path of D partition because ubuntu that I have used allows me to use just the terminal so I can just type commands. How D partition is known inside ubuntu?
    – saadia
    Commented Dec 18, 2019 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.