Read L4T version from Jetpack 4.2.1

Hi all,

I am using nv_tegra_release to read the version installed in my L4T, following


I see from Jetpack 4.2.1 this file doesn’t exist or is not in “/etc” folder. Where can I find the version from this Jetpack?

Best regards,

Hi Raffaello, moving forward, its recommended to read the version using dpkg from nvidia-l4t-core package.

For reference, see this script which can handle it both ways:

HI Dustin!

Thank you! I will use soon to update my jetson_stats!

Hi Dustin!

Thx, I fixed my file project

And I suggest to fix in your code with these lines. You can read all numbers JETSON_L4T_REVISION:

# Read version
JETSON_L4T_STRING=$(dpkg-query --showformat='${Version}' --show nvidia-l4t-core)
# extract version
JETSON_L4T_ARRAY=$(echo $JETSON_L4T_STRING | cut -f 1 -d '-')
# Load release and revision
JETSON_L4T_RELEASE=$(echo $JETSON_L4T_ARRAY | cut -f 1 -d '.')