-bash: atuin: command not found centos 9

Atuin is not found at login if I reload .bashrc it works


cat .bashrc
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi


# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
    PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
        for rc in ~/.bashrc.d/*; do
                if [ -f "$rc" ]; then
                        . "$rc"
                fi
        done
fi

unset rc

[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash)"

[clockard@auto ~]$ echo $PATH
/home/linuxbrew/.linuxbrew/opt/talosctl/bin:/home/clockard/.atuin/bin:/home/clockard/.local/bin:/home/clockard/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin

will thanks anyway I’m not sure what to do.

It seems your PATH is maybe manipulated in another file as well. e.g. .bash_profile or .profile which is not called at login.

First check where atuin is installed:

which atuin
command -v atuin

(which is deprecated.) But according to your output it seems that it might be in /home/clockard/.atuin/bin

Then add the atuin path to your PATH, but not in the if construct.

e.g. before the last line in your .bashrc do this:

export PATH=$PATH:/home/clockard/.atuin/bin