<p>On Unix systems the <code>debug.log</code> file, as well as all other files created by the client (blockchain data, databases, etc) are placed by default in <code>~/.bitcoin</code>; that is, a subdirectory of your home directory named <code>.bitcoin</code>.  If you have used <code>-datadir</code> to set a different data directory, <code>debug.log</code> will be placed there instead.</p>

<p>Note that the <code>ls</code> command normally will not show files or directories that start with <code>.</code>, so you won't see this if you just <code>ls</code> your home directory.  But you can still <code>cd</code> there, or use <code>ls -a</code> to see it.</p>

CC BY-SA 3.0
2017-11-14T11:18:30.747Z
I think this is outdated information Nate, I think all the code that produced this file has been removed from the Bitcoin code around 2014.
Barney Chambers
CC BY-SA 3.0
2017-11-14T16:45:31.543Z
No, I don't think so.  You can see at https://github.com/bitcoin/bitcoin/blob/a1f7f1870931fe978069482ec0f7dc7d59456966/src/util.cpp#L192 in the current version where `debug.log` is opened.  Additionally, I just tested v0.15.0 and the file is still written.
Nate Eldredge
CC BY-SA 3.0
2017-11-14T04:36:17.060Z
2017-11-14T16:46:00.293Z
2017-11-14T16:46:00.293Z
Nate Eldredge
<p>I am running 64bit Ubuntu 17.04, I am following <a href="https://bitcointalk.org/index.php?topic=225690.0" rel="nofollow noreferrer">this</a> tutorial for creating a new altcoin. I am up to section 7, here to be exact:</p>

<p><code>The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()</code></p>

<p>I am struggling to find the <code>debug.log</code> file, and so cannot get my hashes to continue. This guide is quite old (4 years) and I think is for setting up an altcoin on Windows.</p>

<p><strong>Where is my debug.log file? If it doesn't exist, what is my next step?</strong></p>

CC BY-SA 3.0
2017-11-14T04:37:11.993Z
Just as general advice, 4 years ago is an eternity in cryptocurrency time.  I would not count on any information that old still being correct or usable.
Nate Eldredge
CC BY-SA 3.0
2017-11-14T06:38:33.453Z
It's the only information around unfortunately!
Barney Chambers
<bitcoin-core><hash><bitcoin-core-development><genesis-block>
Where is debug.log file in Bitcoin source code?
Barney Chambers
# Where is debug.log file in Bitcoin source code?

(Asked by: username_0 on 2017-11-14)

I am running 64bit Ubuntu 17.04, I am following [this](https://bitcointalk.org/index.php?topic=225690.0) tutorial for creating a new altcoin. I am up to section 7, here to be exact:

`The first time you run the compiled code (daemon or qt), it will say "assertion failed". Just exit the program, go to
config dir (under AppData/Roaming), open the debug.log, get the hash after "block.GetHash() = ", copy and paste it to the beginnig of main.cpp, hashGenesisBlock. Also get the merkle root in the same log file, paste it to the ... position in the following code, in LoadBlockIndex()`

I am struggling to find the `debug.log` file, and so cannot get my hashes to continue. This guide is quite old (4 years) and I think is for setting up an altcoin on Windows.

**Where is my debug.log file? If it doesn't exist, what is my next step?**

**Tags:** bitcoin-core, hash, bitcoin-core-development, genesis-block

> **Comments:**
> **username_1**: Just as general advice, 4 years ago is an eternity in cryptocurrency time.  I would not count on any information that old still being correct or usable.  
> **username_0**: It's the only information around unfortunately!  

---

## 1 answers

### Answer by username_1 on 2017-11-14. Score: 5 | Accepted answer

On Unix systems the `debug.log` file, as well as all other files created by the client (blockchain data, databases, etc) are placed by default in `~/.bitcoin`; that is, a subdirectory of your home directory named `.bitcoin`. If you have used `-datadir` to set a different data directory, `debug.log` will be placed there instead.

Note that the `ls` command normally will not show files or directories that start with `.`, so you won't see this if you just `ls` your home directory. But you can still `cd` there, or use `ls -a` to see it.

> **Comments:**
> **username_0**: I think this is outdated information username_1, I think all the code that produced this file has been removed from the Bitcoin code around 2014.  
> **username_1**: No, I don't think so.  You can see at https://github.com/bitcoin/bitcoin/blob/a1f7f1870931fe978069482ec0f7dc7d59456966/src/util.cpp#L192 in the current version where `debug.log` is opened.  Additionally, I just tested v0.15.0 and the file is still written.  

---

