Make this file executable and save it as /usr/bin/occ Now whenever you want to use the CLI tool occ, you can do it from anywhere. Don't forget to set the two variables nextcloudpath and wwwuser