Score:0

WSL2 - How to use apps installed on root while logged into another user

ro flag

Basically, on my root user in WSL2 I have a /.vscode directory and a /.docker directory for those respective applications. this allows me to type in the "code ." command and open a folder in vscode using the vscode server extension.

I am now trying to do this within a different user to attempt to get into good habits of avoiding downloading third party software in the root directory, but am given the error:

"Command 'code' not found"

I was curious if there was a way to utilize the applications from my root directory, or if there was a different way I should be looking at this. Should I uninstall those applications from root and try to keep things in the user's folder?

NotTheDr01ds avatar
vn flag
Welcome to Ask Ubuntu! It sounds like you are saying that the default user (when you start WSL) is root? That *should* be the only way that you are able to use VSCode as root (which isn't recommended). Windows applications run as the WSL *default* user only, so VSCode (and others) will only run as one user. There are workarounds available for some cases, but first I'd like to confirm how things are working right now for you. Thanks!
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.