To check the current tensorrt version run the below command.
dpkg -l | grep nvinfer
If you are checking the tensorrt version Jetson device then the below command may help you.
dpkg -l | grep TensorRT
Also find out the current cuda version by reading How to check CUDA version.