Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persisting the Solana command on Linux (Ubuntu) #525

Open
litmus-zhang opened this issue May 26, 2023 · 10 comments
Open

Persisting the Solana command on Linux (Ubuntu) #525

litmus-zhang opened this issue May 26, 2023 · 10 comments

Comments

@litmus-zhang
Copy link
Contributor

After downloading and extracting solana-cli binaries on my machine (Ubuntu 20.04 and 22.04), when i open a new terminal, i cannot access the solana command.

@litmus-zhang
Copy link
Contributor Author

@litmus-zhang working on this

@Sarvesh-Ghildiyal
Copy link

Hello there,
Did you added the path to your binaries to your system path variables?

export PATH=$PATH:/path/to/solana/bin
change the "/path/to/solana/bin" to the actual path of your folder.

and then reload the shell to implement the changes made via

source ~/.bashrc

@litmus-zhang
Copy link
Contributor Author

litmus-zhang commented Dec 6, 2023 via email

@Sarvesh-Ghildiyal
Copy link

when you add the environment variable in the particular session then in that session of terminal are you able to use the cli?

@litmus-zhang
Copy link
Contributor Author

litmus-zhang commented Dec 6, 2023 via email

@Sarvesh-Ghildiyal
Copy link

i dont get it then, like you are saying, if you added the path to environment variable then atleast it should atleast work on the same terminal!

can you please provide some more details, error logs or so?

@litmus-zhang
Copy link
Contributor Author

litmus-zhang commented Dec 6, 2023 via email

@Sarvesh-Ghildiyal
Copy link

Oh great! We on right track then glad 😌 it happened.

Soooo now what u gotta do is simple, just save the env variable manually open your bashrc in nano and paste the env path at the bottom of the file and save it.

nano ~/.bashrc

Then, at the bottom of file paste

export PATH=/your/directory/path:$PATH

With the actual path, save it and close it.

@Johnsonojo
Copy link

Johnsonojo commented Jan 12, 2024

Oh great! We on right track then glad 😌 it happened.

Soooo now what u gotta do is simple, just save the env variable manually open your bashrc in nano and paste the env path at the bottom of the file and save it.

nano ~/.bashrc

Then, at the bottom of file paste

export PATH=/your/directory/path:$PATH

With the actual path, save it and close it.

Hi @Sarvesh-Ghildiyal I'm also having the same issue. I've tried your suggestions but it still doesn't work

@willian-uiu
Copy link

when you use the command
export PATH="/home/userName/.local/share/solana/install/active_release/bin:$PATH"
The SOLANA CLI turn open temporaly. You have to add this command on your .bashrc for work what you want

after do this, work on normally

link of reference:
https://phoenixnap.com/kb/linux-add-to-path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants