From c6f85bca916792b4fd501584035fb01a0a29e800 Mon Sep 17 00:00:00 2001 From: Kumar Sahaj Date: Thu, 21 Sep 2023 07:30:58 +0000 Subject: [PATCH] checks_1 --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index e3a9ae6..abd87e3 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,27 @@ sudo docker --version ``` +## How to see availble ports ? + ++ Open a new terminal on your Ubuntu system and copy the code given below: +``` + + # Specify the range of ports you want to check (e.g., 8000 to 9000) + start_port=8000 + end_port=9000 + + # Use a loop to check each port in the specified range + for port in $(seq "$start_port" "$end_port"); do + # Use netstat or ss to check if the port is in use + if ! ss -tuln | grep -q ":$port\b"; then + echo "Port $port is available" + fi + done + + ``` + + + ## Running Manually + After the installation of docker and sysbox run the dockerfile.