A database in one file

Install and open SQLite

Verify the SQLite command-line shell, install it when needed, and open your first local database.

8 minute lesson

~~~

Start by checking whether the SQLite shell is already available:

sqlite3 --version

macOS includes a system copy. On macOS you can also install a newer copy with brew install sqlite. On Windows or Linux, use the package linked from the official SQLite download page or your operating system’s package manager.

Now open a database named notes.db:

sqlite3 notes.db

You should see a sqlite> prompt. Run SELECT sqlite_version(); to check the library used by this shell, then leave with .quit.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →