You can start Solr by running bin/solr from the Solr directory and this will start Solr in the background, listening on port 8983.
$ bin/solr start
To change the port Solr listens on, you can use the -p parameter when starting, such as:
$ bin/solr start -p 8984
Since Solr is a server, it is more common to run it in the background, especially on Unix/Linux. However, to start Solr in the foreground, simply do:
$ bin/solr start -f
When running Solr in the foreground (using -f), then you can stop it using Ctrl-c. However, when running in the background, you should use the stop command, such as:
$ bin/solr stop -p 8983
The stop command requires you to specify the port Solr is listening on or you can use the -all parameter to stop all running Solr instances.
If you're not sure if Solr is running locally, you can use the status command:
$ bin/solr status