restart postgres from command line code example
Example 1: restart postgres ubuntu
sudo service postgresql restart
Example 2: restart postgresql
sudo /etc/init.d/postgresql restart
sudo service postgresql restart
sudo /etc/init.d/postgresql restart