«Stores» → «Configuration» → «Advanced» → «Developer» → «Static Files Settings» → «Sign Static Files»

«Stores» → «Configuration» → «Advanced» → «Developer» → «Static Files Settings» → «Sign Static Files»

You can do it from the command line too:
mysql --host=<host> --user=<user> --password=<password> -D <database> -e "\
UPDATE core_config_data SET value = <1 or 0> WHERE 'dev/static/sign' = path; \
";
Then delete the cache:
bin/magento cache:clean
In Magento >= 2.2 you can do it as
bin/magento config:set dev/static/sign <1 or 0>
bin/magento cache:clean
See also: