List of ubuntu commands
To check if a specific port is open on your Ubuntu server, you can use the netstat or ss command. For example, to check if port 80 is open, run:
sudo netstat -tuln | grep :80or
sudo ss -tuln | grep :80These commands will display information about open ports and listening services.
If you need to check a particular open port, you can use the nc (netcat) command. To check if port 22 is open, use:
nc -zv localhost 22This will tell you if the port is open and accepting connections.
To get a list of all open ports on your Ubuntu server, use the netstat or ss commands without specifying a port:
sudo netstat -tulnor
sudo ss -tulnThese commands provide a comprehensive list of all open ports and their associated services.
Another useful tool to check ports on your Ubuntu server is nmap. Install nmap using:
sudo apt-get install nmapThen, to scan for open ports, use:
nmap -sT localhostThis will scan and list all open TCP ports on your server.
To check the status and details of your Let's Encrypt certificate on Ubuntu, use the openssl command. For example, to check the certificate for a domain, run:
openssl s_client -connect yourdomain.com:443 -servername yourdomain.comThis command will provide details about the SSL certificate, including its validity period and issuer.
By using these commands and tools, you can effectively manage and troubleshoot your Ubuntu server, ensuring that your ports are correctly configured and your SSL certificates are valid.