Change SQLite default settings

we know when type .mode column let me see tables like column And .headers on , we can see the header of tables. But I want to know if there is any way make the two default settings?

Do some modify for the source code of sqlite?? OR is there a config file for these settings?


Put:

.headers on
.mode column

In a file called .sqliterc in the home directory of the user running sqlite.

(P.S. I found that in man sqlite3.)


Make sure using the following command to open the file:

nano ~/.sqliterc

then add

.headers on
.mode column

to the file and save it