Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: anon4250158 on March 18, 2015, 09:53:30 AM



Title: change data directory on Ubuntu
Post by: anon4250158 on March 18, 2015, 09:53:30 AM
I installed bitcoin-qt on Ubuntu 14.04, and when I first ran it it asked if I wanted to use the default directory or a custom one.  I want to use a custom one, but I entered the directory path incorrectly.  Now whenever I open bitcoin-qt it gives me the "error opening block database- do you want to rebuild?" message.  How do I change the data directory?  It's so easy on Windows, but I know next to nothing about Ubuntu.


Title: Re: change data directory on Ubuntu
Post by: matt4054 on March 18, 2015, 10:03:23 AM
It's so easy on Windows, but I know next to nothing about Ubuntu.

It's the same procedure in Windows or Linux, actually, only the location of the bitcoin.conf file changes.

Locate your bitcoin.conf file, it should be ~/.bitcoin/bitcoin.conf

If you're not familiar with the UNIX filesystem paths and hierarchy, and/or using the GUI:

  • ~ is your home directory, i.e. /home/<your-username>
  • .bitcoin is a hidden directory, so you may need to change display settings if it's not showing up

Then use your favorite editor and add or edit this line:

Code:
datadir=/<path>/<to>/<your>/<datadir>