Skip to content
vast-cow's blog
Go back

Installing uv System-Wide on Linux

Edit page

If you want to install uv system-wide on Linux and make uv / uvx available to all users, the simplest method is to install it in /usr/local/bin.

curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin UV_NO_MODIFY_PATH=1 sudo -E sh

Verification:

which uv
uv --version
which uvx

Expected output:

/usr/local/bin/uv
/usr/local/bin/uvx

The official installer normally installs to the user’s home directory, but you can change the installation location with UV_INSTALL_DIR. Setting UV_NO_MODIFY_PATH=1 also prevents the installer from modifying the PATH in files like root’s .bashrc.

Important Notes

This configuration makes the uv command itself available system-wide. It does not automatically make Python, caches, or tools installed with uv tool install available in a shared directory. By default, these will still be stored in user-specific directories like ~/.local/share/uv and ~/.cache/uv.

For example:

# user1
uv python install 3.13

# user2
uv python list

In this case, user1 and user2 will have separate management areas.

If your intention is to make not only the uv command itself, but also the Python and tools installed by uv available in a shared directory, such as /opt/uv, for all users, it is better to create a system-wide configuration for Rocky Linux, including /etc/profile.d/uv.sh. In this case, you can design the directory structure to separate them, for example, /opt/uv/{python,tools,cache}.


Edit page
Share this post:

Comments


Previous Post
A collection of practical techniques to keep in mind when using Chrome DevTools.
Next Post
Tampermonkey Script to Open ChatGPT's 'New Chat' in a New Tab