I was wondering that if Tor allows using of treaceroute command from the terminal which tells from which gateways your data packets are going through.
No, you cannot use
traceroute (or any similar programs or techniques since they rely on information in IP packet frames - specifically the TTL field and ICMP replies to TTL expiration - and Tor does not preserve them, only the stream data is carried over the Tor network).
Tails does include Onion Circuits, which will show your current circuits and which connections are using them, if any.
To access it click on the onion icon on the top right (next to the network, sound and power indicators) and select Open Onion Circuits, this will provide you with an overview of your Tor connections.
This can also be seen in Tor Browser by clicking on the Tor Button onion icon, to see the circuit used for the current website.