Answer the question
In order to leave comments, you need to log in
Why are alias not loaded from non-root?
I can not understand why aliases are not loaded.
I add a line with my script to /etc/bash.bashrc:
alias host='python3 /home/sanderu/host.py'
And I see that it doesn't work.
alias output:
alias
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\ ''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias egrep='egrep --color =auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
As I see it, needed is not here.
At the same time, aliases are added under the root:
in /root/.bashrc the same
script construction is rendered correctly, in alice :
# alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto '
alias host='python3 /home/sanderu/host.py'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
Answer the question
In order to leave comments, you need to log in
Why not in ~/.bashrc ?
Add like this:
echo -e "alias host='python3 /home/sanderu/host.py'" >> ~/.bashrc; . ~/.bashrc
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question