access_time 6 months ago languageEnglish
more_vert

Install SQLite 3 on WSL

visibility 244 comment 0

Prerequisites

Before installing SQLite 3on WSL, please ensure you have WSL enabled on your Windows 10 system. 

Follow Install Windows Subsystem for Linux on a Non-System Drive to install WSL on a non-C drive. 

This tutorial provides steps to install SQLite 3 on WSL Debian distro. You can follow similar steps to install it in other Linux distros. 

Step by step guide

  1. Open Debian distro through WSL command:
    wsl -d Debian
  2. Update Debian packages:
    sudo apt update

    You need to type user password.

  3. Install SQLite 3  using the following command:
    sudo apt install sqlite3

    Type Y to continue when asked.

  4. Wait until the installation is completed. 
  5. Verify SQLite version:
    $ sqlite3 --version
    3.16.2 2017-01-06 16:32:41 a65a62893ca8319e89e48b8a38cf8a59c69a8209

Test SQLite 3

  1. Create a database named test.db using the following command:
    sqlite3 test.db

    The command outputs the following:

    SQLite version 3.16.2 2017-01-06 16:32:41
    Enter ".help" for usage hints.
    sqlite>
  2. Check database list using the following command:
    sqlite> .databases
    The output looks like the following screenshot:

  3. Type .exit to exit the CLI.
  4. Run command ls and you will find the file database is created.
    $ ls
    test.db
    
copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn.

Want to contribute on Kontext to help others?

Learn more

More from Kontext

visibility 990
thumb_up 0
access_time 6 months ago
Install HBase in WSL - Pseudo-Distributed Mode
visibility 427
thumb_up 0
access_time 6 months ago
Apache Spark 3.0.1 Installation on Linux or WSL Guide
visibility 1089
thumb_up 0
access_time 8 months ago