Interacting with a .db file from Linux shell Interacting with a .db file from Linux shell database database

Interacting with a .db file from Linux shell


You will have to install a package named 'sqlite' or 'sqlite3'.

Then you will be able to interact with your .db file using

$ sqlite3 files.db> SELECT blah FROM your_table WHERE ......

In your post you mention 'SQLite3', the package name should have no caps letters.

Did you run an apt-cache search sqlite ?


You could also use python, since it should already be on your Raspberry Pi and comes with batteries / sqlite3 included.

python -c "import sqlite3; print(sqlite3.connect('example.db').cursor().execute('SELECT * FROM stocks ORDER BY price').fetchall())"