Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: ichi on July 12, 2010, 02:19:36 AM



Title: How-to for running Bitcoin on Linux sans GUI?
Post by: ichi on July 12, 2010, 02:19:36 AM
I've installed Bitcoin 0.3 on Ubuntu 10.04 Server x64.  Is there how-to for interacting with Bitcoin via tty?  Although I've found some info, it looks more like programming API than command line.


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: sirius on July 12, 2010, 02:34:11 AM
I've installed Bitcoin 0.3 on Ubuntu 10.04 Server x64.  Is there how-to for interacting with Bitcoin via tty?  Although I've found some info, it looks more like programming API than command line.

The API commands listed in the wiki (http://www.bitcoin.org/wiki/doku.php?id=api) can be used from the command line also, like this:
Code:
./bitcoind
./bitcoind getinfo

Bitcoind is the headless daemon binary supplied with the download packages.


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: ichi on July 12, 2010, 03:42:26 AM
Thank you, sirius-m.

So far, I've mastered ...

Code:
./bitcoind
./bitcoind getinfo
./bitcoind setgenerate true

How do I get khash/s ???  I didn't see that in the wiki.

Do I calculate it from difficulty?  I vaguely recall seeing that, but not where.


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: theymos on July 12, 2010, 03:44:41 AM
Search debug.log for "hashmeter".


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: ichi on July 12, 2010, 05:05:59 AM
Thank you, theymos.

Unfortunately, I can't find debug.log  :-[

Perhaps I haven't actually installed Bitcoin.  I'm just running bitcoind from /bitcoin-0.3.0/bin/64.

Perhaps bitcoind isn't writing debug.log  because /etc/bitcoin/ doesn't exist ???

Should I make /etc/bitcoin/ and copy the contents of /bitcoin-0.3.0/ there ???


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: theymos on July 12, 2010, 05:36:43 AM
It's in your datadir -- the same location as wallet.dat. You can specify datadir as a parameter: "bitcoind -datadir=/whatever", but I think it's probably used some default location.


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: ichi on July 12, 2010, 08:29:11 AM
Thanks again, theymos.

I found /home/[me]/.bitcoin/debug.log -- sort of, anyway (using find, I mean -- more below).

Code:
grep -i hashmeter /home/[me]/.bitcoin/debug.log

... tells me that I'm running at 2,470 khash/s.  I'm happy with that.

I'm still confused, however.  When I navigate to /home/[me], I see no /.bitcoin there via ls.  I've obviously forgotten what little I ever knew re bash scripting.  How do I find where debug.log (and wallet.dat !!!) are actually (hatever that means) located ???


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: asdfman on July 12, 2010, 08:49:43 AM
it automatically "hides" any directory prefixed with "." so doing a ls wont show.. to make it show do a ls -a ~
then you will see .bitcoin

just do a ls -latr ~/.bitcoin to see the other files in the dir


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: ichi on July 12, 2010, 11:09:54 AM
Ah.  Got it.  Thank you, asdfman.

In case it's not obvious, it's been over ten years since I worked much with Unix.


Title: Re: How-to for running Bitcoin on Linux sans GUI?
Post by: Xunie on July 12, 2010, 11:12:53 AM
I've written a wiki article about bitcoind here: http://www.bitcoin.org/wiki/doku.php?id=headless_client (http://www.bitcoin.org/wiki/doku.php?id=headless_client).
I suggest you read through the getting started article here: http://www.bitcoin.org/wiki/doku.php?id=getting_started (http://www.bitcoin.org/wiki/doku.php?id=getting_started)