<p>On command line bitcoin can be started in several ways</p>

<p><code>bitcoind</code> starts a process with the current user. This way the home directory of this user will be searched for a config file and will be used as data directory as default.</p>

<p><code>service bitcoin start</code> will use the startup script <code>/etc/systemd/system/bitcoind.service</code>. This might contain a link to a configuration file. In my case this config file did not contain of a data directory which I found troubling. But the solution is that it contains a <strong>user</strong>. This user's home directory is then automatically referred to.</p>

<p>So, in my case I was using the terminal as user <code>pi</code> and had to start the process as user <code>bitcoin</code> instead. This can be done by </p>

<pre><code>sudo runuser -l bitcoin -c 'bitcoind'
</code></pre>

CC BY-SA 4.0
2019-08-28T11:12:20.980Z
2019-08-28T11:12:20.980Z
bomben
<p>I had troubles with my client on a Raspberry because it was using the wrong configuration file and I could not find any entry in the configuration file that referred to the right location of the data directory, but I knew it was beeing used correctly in the past. </p>

<p>I was trying to use <code>-printtoconsole</code> to debug the problem but that did also not work.</p>

<bitcoind>
What different options are there to start bitcoin on command line?
bomben
# What different options are there to start bitcoin on command line?

(Asked by: username_0 on 2019-08-28)

I had troubles with my client on a Raspberry because it was using the wrong configuration file and I could not find any entry in the configuration file that referred to the right location of the data directory, but I knew it was beeing used correctly in the past.

I was trying to use `-printtoconsole` to debug the problem but that did also not work.

**Tags:** bitcoind


---

## 1 answers

### Answer by username_0 on 2019-08-28. Score: 0 | Accepted answer

On command line bitcoin can be started in several ways

`bitcoind` starts a process with the current user. This way the home directory of this user will be searched for a config file and will be used as data directory as default.

`service bitcoin start` will use the startup script `/etc/systemd/system/bitcoind.service`. This might contain a link to a configuration file. In my case this config file did not contain of a data directory which I found troubling. But the solution is that it contains a **user**. This user's home directory is then automatically referred to.

So, in my case I was using the terminal as user `pi` and had to start the process as user `bitcoin` instead. This can be done by

```
sudo runuser -l bitcoin -c 'bitcoind'

```


---

