Score:0

How to make program installed in /root available to user? bash PATH

US flag

Sorry if this is trivial, I'm struggling to understand the PATH variable system.

I have deno (the js runtime) installed here /root/.deno/bin/deno

I have a user, let's say it's called user0. When I switch to that user with su - user0, how do I make deno available? Especially through a reboot.

––––––––

Edit: I got it working for user0 by appending to the local .bashrc ie ~/.bashrc export PATH="/root/.deno/bin:$PATH"

This works, but what is the best practice for installing executables that should be available to all users?

user535733 avatar
cn flag
Only root should have permission to view contents of `/root`. Nobody else. Software available to all users (non-deb, non-snap, non-Flatpak, non-pip) should typically be located in `/usr/local/` Is there a reason you cannot use the typical location?
JorgeZapatero avatar
md
@user535733 No real reason. I'm using a remote server and just started installing what I thought I needed before creating other users. How do you suggest I remedy this? Uninstall from `/root/` and try again in `/user/local/`? For context this was the install command I used for `deno`: `curl -fsSL https://deno.land/x/install/install.sh | sh` How do ensure that the binary is installed in `/user/local/`?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.