how to restart postgresql server in ubuntu code example Example: restart postgres ubuntu sudo service postgresql restart