If I have 10 tabs opened, I have to close each one using \":q\" separately.
How can I close them all at once?
That can be done with the following command (in normal or escape mode):
:tabdo :q
"tabdo" apparently executes the command for all the open tabs.