• Help changing PATH in .zshrc


    Hi,

    I changed my shell to zsh, downloaded the zsh and oh-my-zsh-git package from yaourt, and as instructed I copied the settings into my .zshrc. But what I just dont understand is

    #if you come from bash you might have to change your path
    #export PATH=$HOME/bin:/usr/local/bin:$PATH
    

    should I just uncomment the export line? or do i have to modify it? I have been reading through google and arch wiki, but I still dont understand which PATH is it, …when i do

    echo $HOME
    /home/kabir
    echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    

    In case it helps to know, /etc/environment has:

    #This file is parsed by pam_env module
    #syntax: simple "KEY=VAL" pairs on separate lines
    
    #BEGIN ADDED BY CNCHI INSTALLER
    BROWSER=/usr/bin/chromium
    EDITOR=/usr/bin/nano
    #END ADDED BY CNCHI INSTALLER
    

    can anyone help me understand what the PATH line should be in my .zshrc?

    Thanks!
    K

  • @KabirGandhiok said in Help changing PATH in .zshrc:

    Sorry, can’t understand what is not clear here. It is simply proposed to add the ~/bin and /usr/local/bin folders in front of the existing path.

    The /usr/local/bin is already in your path. There’s no sense to duplicate it.

    If you have some executables in the ~/bin, then it might have sense to add it to path.

    It there’s no ~/bin at all, then there’s no sense to add it to path.

    If you don’t want to add anything, don’t uncomment the line.

    Or, if you want to add some folder, modify the line as needed and uncomment it.

    That’s it.

  • @just Oh ok!! I get it now, I only need to edit path if I have a ~/bin, because $HOME/bin and ~/bin is the same thing… Thanks for making it clear! :-D

  • @KabirGandhiok said in Help changing PATH in .zshrc:

    …Thanks for making it clear! :-D

    For nothing. Will mark the topic as [Solved], if you agree.

  • @just yes! its solved :)

changing11 path4 zshrc1 Posts 5Views 650
Log in to reply