Open Debian distro through WSL command:
wsl -d Debian
Update Debian packages:
sudo apt update
You need to type user password.
Install SQLite 3 using the following command:
sudo apt install sqlite3
Type
Y
to continue when asked.Wait until the installation is completed.
Verify SQLite version:
$ sqlite3 --version 3.16.2 2017-01-06 16:32:41 a65a62893ca8319e89e48b8a38cf8a59c69a8209
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>
Check database list using the following command:
sqlite> .databases
The output looks like the following screenshot:
sqlite> .databases main: /path/to/samplephp/samplephp.db sqlite> .exit
Type
.exit
to exit the CLI.Run command
ls
and you will find the file database is created.$ ls test.db
How to install the SQLite PDO extension on Ubuntu
PDO_SQLITE driver not present.. what to do?
Install PHP SQLite
sudo apt-get install php-sqlite3
SQLite PHP: Connecting to SQLite Database From PHP Using PDO