# Is there a linux tool to open or query sqlcipher database in the terminal?

**URL:** <https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836>\
**Category:** SQLCipher\
**Created:** [August 12, 2019, 1:54pm UTC](https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836 "2019-08-12T13:54:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lancecontreras](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/lancecontreras/32/765_2.png) [@lancecontreras](https://discuss.zetetic.net/u/lancecontreras)\
**Post date:** [August 12, 2019, 1:54pm UTC](https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836/1 "2019-08-12T13:54:10Z")

</div>

Is there a linux tool to open or query sqlcipher database in the terminal such as the sqlite? I am aware of DB Browser but if I have a sqlcipher db in a remote server that I want to query, what would be the best tool to use?

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [August 12, 2019, 2:11pm UTC](https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836/2 "2019-08-12T14:11:24Z")

</div>

Hi @lancecontreras

You might want to take a look here:

> [@Management Interfaces for SQLCipher Databases](https://discuss.zetetic.net/t/management-interfaces-for-sqlcipher-databases/121):
>
> Users often need to interact with SQLCipher encrypted databases outside of application code for testing, database development, and troubleshooting. There are a few options for managing SQLCipher databases outside of your development environment and applications. Option 1: SQLCipher Commercial Edition Command Line Shell Many of the [SQLCipher Commercial Edition packages](https://www.zetetic.net/sqlcipher/buy/) include a pre-built [SQLite command line](http://www.sqlite.org/cli.html) shell tool that can be used to manipulate SQLCipher databases from a desktop computer. […

---

<div class="post-metadata">

**Author:** ![lancecontreras](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/lancecontreras/32/765_2.png) [@lancecontreras](https://discuss.zetetic.net/u/lancecontreras)\
**Post date:** [August 12, 2019, 8:29pm UTC](https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836/3 "2019-08-12T20:29:21Z")

</div>

Ok, we have the commercial license for sqlcipher, I checked on the zip file that I downloaded from zetetic website. There’s a sqlcipher.exe under the shell folder, but that’s for windows. Is there anything we can use for linux?

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [August 13, 2019, 1:14pm UTC](https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836/4 "2019-08-13T13:14:13Z")

</div>

Hello @lancecontreras

For the Linux platform, you can compile the command line shell following [these steps](https://www.zetetic.net/sqlcipher/introduction/).

---

<div class="post-metadata">

**Author:** ![lancecontreras](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/lancecontreras/32/765_2.png) [@lancecontreras](https://discuss.zetetic.net/u/lancecontreras)\
**Post date:** [December 15, 2025, 5:00pm UTC](https://discuss.zetetic.net/t/is-there-a-linux-tool-to-open-or-query-sqlcipher-database-in-the-terminal/3836/5 "2025-12-15T17:00:10Z")

</div>

Thank you! I was able to compile it and run on a Linux environment!

## TLDR;

```auto
$ git clone https://github.com/sqlcipher/sqlcipher.git
$ ./configure --with-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown" LDFLAGS="-lcrypto" 
$ make
$ sqlite3 database.db 
sqlite> pragma key = 'yourpassword'; 
sqlite> select * from yourtablename;

```
