I
I
ilovemaryjane2018-11-24 13:57:33
linux
ilovemaryjane, 2018-11-24 13:57:33

How to add /home/bin to PATH using zsh?

On Ubuntu it works by itself, you just need to create the bin folder.
On Debian, I added this to No effect. Also, I noticed there in the same place it was the default.profile
export PATH=$PATH:~/bin
.profile

if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

Those. in theory, it should also work automatically if a folder is created? But doesn't work. Scripts are not globally visible.
upd. if important, use zsh

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AVKor, 2018-11-24
@ilovemaryjane

~/.zshrc

S
SOTVM, 2018-11-24
@sotvm

I have this in .profile , everything works

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
  . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question