I think the
tree command can help you with this. You can use the
-d option to list directories only. Please run the next commands to install tree on your server.
sudo apt update
sudo apt install -y tree
After that, you can run it with
tree -d and it will list all the directories under the current folder. You can get more information about other parameters using the command below
Hope it helps,