How to Install SQLite on Ubuntu 20.04 (Legacy Guide)
Install SQLite on Ubuntu 20.04 for an existing system. Standard security maintenance ended in 2025; Ubuntu Pro ESM may cover it through 2030.
On this page
This guide preserves the package-based SQLite installation steps for an existing Ubuntu 20.04 LTS system.
Legacy system: Standard security maintenance for Ubuntu 20.04 ended in May 2025. Ubuntu Pro Expanded Security Maintenance may provide coverage through May 2030; check whether the system is enrolled and whether the packages you use are covered. For a new deployment, use a current Ubuntu LTS release; Ubuntu 22.04 is also covered by a maintained-release guide. See Canonical’s Ubuntu release cycle.
Prerequisites
Before you begin the installation, make sure you have the following:
- Ubuntu 20: Ensure you have a working Ubuntu 20 installation.
- Terminal: Access to the terminal or command line interface with sudo privileges.
Now that you have the prerequisites in place, let’s proceed with the installation.
Step 1: Refresh the package index
Refresh APT’s package index so it can find the SQLite package:
sudo apt update
This updates package metadata; it does not install system upgrades or extend Ubuntu 20.04 security coverage.
Step 2: Install SQLite
SQLite is available in the Ubuntu package repository, so you can easily install it using the apt package manager. To do this, run the following command:
sudo apt install sqlite3
The system will prompt you to confirm the installation. Type ‘y’ and press Enter to proceed.
Step 3: Verify the Installation
To verify that SQLite has been successfully installed, you can check the version of SQLite by running the following command:
sqlite3 --version
You should see the installed SQLite version in the output.
Step 4: Start Using SQLite
With SQLite installed, you can start using it right away. To open an interactive SQLite prompt, simply type:
sqlite3
This will open a new SQLite shell where you can execute SQL commands and manage your databases.
Conclusion
You’ve successfully installed SQLite on your Ubuntu 20 system. You can now use SQLite to create, manage, and query databases for your applications. This lightweight database management system is highly versatile and can be used for a wide range of projects. If you’re new to SQLite, be sure to explore its documentation and tutorials to harness the full power of this powerful database system.
Happy coding!