Page 1 of 1

Ubuntu commands

Posted: Thu Dec 03, 2020 9:01 pm
by 00
service --status-all
sudo service --status-all | grep postgres
sudo service postgresql status

Run any one of the following command on Linux to see open ports:
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
sudo nmap -sTU -O IP-address-Here


To shutdown the system:
sudo shutdown -h now
To restart:
sudo reboot now
& one more command for restart:
sudo shutdown -r now