How to Check if Python is Installed Linux
which is a very helpful command in linux- when we pass which a command it looks through our machine for where the application lives in our filesystem.
which python
Will eaither return an empty line or the path to the application on disk:
/usr/bin/python
Wondering Which Python Version You're On?
python -V
This will print the version you’re on:
Python 2.7.12
Need to Install Python?
sudo apt-get install python
If you’re writing a bash script to install programs for a fresh server, it’s a good idea to add the -y flag to force the install without being prompt to confirm
sudo apt-get install python -y