`geth` is returning transaction hash and `remix` is returning value. This is a fundamental difference in behavior of `geth` and `remix`. Transactions don’t return a contract value to the front end because transactions are not immediately mined and included in the blockchain. To get values from a function either you should use solidity events or you should use calls in ethereum. Refer [this][1] blog to understand more about calls and transactions in solidity. Refer to [this][2] blog for understanding more about solidity events. Refer [this][3] question to understand why to write return statements in solidity function. [1]: https://blog.b9lab.com/calls-vs-transactions-in-ethereum-smart-contracts-62d6b17d0bc2 [2]: http://%20https://media.consensys.net/technical-introduction-to-events-and-logs-in-ethereum-a074d65dd61e [3]: https://ethereum.stackexchange.com/questions/51039/why-to-write-return-statements-in-solidity-function