Reputation: 647
I am new to Ubuntu and I am using xfce desktop environment. I was using this vscode docs to install vscode in ubuntu. I ran this command:
sudo snap install --classic code # or code-insiders
which executed successfully. The documentation does not say how to open VSCODE. I am assuming there is no way to open it using GUI as VS Code did not appear when I tried to search for it using the search application feature?
I searched on stack overflow and found that I should be able to run vs code at this point by running
code
in the terminal.
But when I do so I get:
Command 'code' is available in '/snap/bin/code' The command could not be located because '/snap/bin' is not included in the PATH environment variable. code: command not found
echo $PATH
gives me:
/sbin:/bin:/usr/bin:/usr/local/bin
I tried to browse to snap/bin folder and open terminal there but the terminal does not open.
Upvotes: 4
Views: 6745
Reputation: 131
rm -f /usr/bin/code
sudo ln -s /usr/share/code/bin/code /usr/bin/code
Upvotes: 1
Reputation: 61
.bashrc
(or .zshrc
) file in your home directory (for example, /home/your-user-name/.bashrc) in a text editor.export PATH="/snap/bin:$PATH"
to the last line of the file..bashrc
/.zshrc
file.Upvotes: 6