Do bitcoind and bitcoin-qt resume blockchain downloading from the same place? This is a multi-part question. 

I downloaded source code of bitcoin core from github and compiled it on my Windows 10. Then I got bitcoind and bitcoin-qt among other commands. I first run bitcoin-qt and choose a directory(D:\bitcoin) for blockchain data storing. However because I need to use bitcoin-cli tool and bitcoin-qt doesn't expose an RPC service by default, I close bitcoin-qt and start bitcoind.

But then I found that bitcoind didn't download blockchain from where bitcoin-qt stopped(by run bitcoin-cli -getinfo). How can I make bitcoind download that way? (I use bitcoind -datadir=D:\bitcoin to do that, is it right?)

Another question is where should I put my configure file. In my home directory(C:\Users\MyName) or just in the same data directory(D:\bitcoin)? Does bitcoind and bitcoin-qt use the same configure file?
bitcoin-qt and bitcoind are built from the same source code. They largely use the same settings, data directory, and configuration file.

However, bitcoin-qt has a set of options that are specific to it. These settings are stored in a separate Qt defined location (on Windows, it's stored in the registry). bitcoind cannot read these settings. If you set your data directory by choosing the location in the dialog box that appears the first time you started, the data directory location is stored in the Qt specific settings so bitcoind cannot read it.

You can set the data directory for bitcoind by creating a bitcoin.conf file in the default data directory location (on Windows, that's %APPDATA%/Bitcoin) and adding the line

datadir=&lt;path&gt;


where &lt;path&gt; is the path to where you want the data directory to be.

Or by adding -datadir=&lt;path&gt; to the command you are using to start bitcoind.


  I use bitcoind -datadir=D:\bitcoin to do that, is it right?


Yes, that is correct.


  In my home directory (C:\Users\MyName) or just in the same data directory (D:\bitcoin)?


You should put the config file in the data directory that the software will open initially. If you are setting -datadir in your startup command or the datadir is specified in your Qt settings, then you should put the config file in the data directory.

If not, you should put it in the default data directory location which is C:\Users\&lt;username&gt;\AppData\Roaming\Bitcoin.


  Does bitcoind and bitcoin-qt use the same configure file?


Yes.