You are not logged in.
Pages: 1
I've been trying for hours and can't for the life of me set path!!!
I need to set:
PATH="$PATH":"$HOME/.pub-cache/bin"
I can do this in terminal and when the session closes the path (obviously) no longer works, I get it's because it's only for the session/terminal I'm using..
I've tried adding:
"$PATH":"$HOME/.pub-cache/bin"
to /etc/bash.bashrc (no bashrc file) but no where logical to actually put it.. so skipped that.
I've also tried various combinations in /etc/profile
append path '$HOME/.pub-cache/bin'
append path '/HOME/.pub-cache/bin'
append path '/home/.pub-cache/bin'
even tried..
# Force PATH to be environment
PATH="$PATH":"$HOME/.pub-cache/bin"
export PATH
# Force PATH to be environment
PATH="$PATH":"$HOME/.pub-cache/bin"
export PATH
I know some(maybe all) of these make no sense but desperation leads to stupidity.
Please help this noob!
Many thanks
Last edited by cloudlessdreams (2021-05-06 13:48:53)
Offline
Did you follow the order of the files that bash uses to initialise itself?
https://wiki.archlinux.org/title/Bash#C … tion_files
Offline
Try adding
PATH=$PATH:~/.pub-cache/binto your .bashrc
Offline
Did you follow the order of the files that bash uses to initialise itself?
https://wiki.archlinux.org/title/Bash#C … tion_files
Yes I have systematically gone through the docs.
/etc/bash.bashrc ... PATH=$PATH:~/.pub-cache/bin doesn't work. (nor does export PATH="$PATH:$HOME/.pub-cache/bin")
/etc/profile.d/*.sh .. shall I create a .sh file with just PATH="$PATH:$HOME/.pub-cache/bin"
~/.bash_logout Per-user, after exit of a login shell. (need it to be always in)
/etc/bash.bashrc PATH=$PATH:~/.pub-cache/bin doesn't work. (nor does export PATH="$PATH:$HOME/.pub-cache/bin") see above.
Offline
Try adding
PATH=$PATH:~/.pub-cache/binto your .bashrc
I don't have a .bashrc just bash.bashrc
Offline
Just create it .
Simplest method to do that it is to copy /etc/bash.bashrc to ~/.bashrc .
Edit ~/.bashrc and delete most of it .
You do want to keep
# If not running interactively, don't do anything
[[ $- != *i* ]] && returnjust incase.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Just create it .
Simplest method to do that it is to copy /etc/bash.bashrc to ~/.bashrc .
Edit ~/.bashrc and delete most of it .
You do want to keep# If not running interactively, don't do anything [[ $- != *i* ]] && returnjust incase.
Created and added PATH=$PATH:~/.pub-cache/bin
still not executing!! Feel like an idiot!
Offline
echo $SHELLOffline
echo $SHELL
/bin/bash/
it's there ...
I think I know what it is.. my directory is /home/ajmal/.bashrc rather than /home/.bashrc and I'm trying to point export PATH="$PATH":"$HOME/.pub-cache/bin"
should it not be .. export PATH="$PATH":"$HOME/ajmal/.pub-cache/bin"
Offline
echo $HOMEOffline
echo $HOME
/home/ajmal~
Offline
I got it working - maybe I had a typo in there God knows!!!!
Thanks a bunch!!
Offline
Pages: 1