Created
December 16, 2025 06:34
-
-
Save itzmeanjan/566f30505beccebf0fe497ac4b92ee3e to your computer and use it in GitHub Desktop.
Setup Vulkan SDK on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/bash | |
| # Script version of "Getting Started with the Linux Tarball Vulkan SDK" guide @ https://vulkan.lunarg.com/doc/sdk/1.4.335.0/linux/getting_started.html. | |
| # Targets Ubuntu, tested to be working on Ubuntu 25.10. | |
| # Source of truth for Vulkan SDK version and checksum @ https://vulkan.lunarg.com/sdk/home#linux. | |
| EXPECTED_SHA256_CHECKSUM="ccab8047f33ef848e3928c7fdd19987b35da3085ad20178f473acc230fa3c5f2" | |
| VULKAN_SDK_VERSION="1.4.335.0" | |
| VULKAN_SDK_TARBALL_DOWNLOAD_URL="https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/linux/vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.xz" | |
| VULKAN_SDK_TARBALL=$(realpath vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.xz) | |
| wget -nc -O $VULKAN_SDK_TARBALL $VULKAN_SDK_TARBALL_DOWNLOAD_URL | |
| COMPUTED_SHA256_CHECKSUM=$(sha256sum "$VULKAN_SDK_TARBALL" | awk '{print $1}') | |
| if [[ "$COMPUTED_SHA256_CHECKSUM" != "$EXPECTED_SHA256_CHECKSUM" ]]; then | |
| echo "FAILED: Checksum mismatch for $VULKAN_SDK_TARBALL." | |
| echo " Expected: $EXPECTED_SHA256_CHECKSUM" | |
| echo " Computed: $COMPUTED_SHA256_CHECKSUM" | |
| exit 1 | |
| fi | |
| sudo apt-get install libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev -y | |
| pushd ~ | |
| rm -rf .vulkan | |
| mkdir .vulkan | |
| pushd .vulkan | |
| tar xf $VULKAN_SDK_TARBALL | |
| VULKAN_RUNTIME_ENV_FILE=$(realpath $VULKAN_SDK_VERSION/setup-env.sh) | |
| source $VULKAN_RUNTIME_ENV_FILE | |
| echo "" >> ~/.bashrc | |
| echo "source $VULKAN_RUNTIME_ENV_FILE" >> ~/.bashrc | |
| popd | |
| popd | |
| vulkaninfo | |
| vkcube | |
| echo "✅ Vulkan SDK installed!" | |
| echo "ℹ️ Open a new SHELL to load all environment variables." | |
| echo "⛔ For uninstalling Vulkan SDK, run 'rm -rf ~/.vulkan' and then remove the line 'source $VULKAN_RUNTIME_ENV_FILE' from '~/.bashrc' file." |
Author
Author
For installing Vulkan driver, see the guide @ https://linux.how2shout.com/how-to-install-vulkan-on-ubuntu-24-04-or-22-04-lts-linux/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For installing the latest version, check version and checksum @ https://vulkan.lunarg.com/sdk/home#linux.