S
S
sanderu2020-07-27 19:58:22
bash
sanderu, 2020-07-27 19:58:22

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

2 answer(s)
V
Valdemar Smorman, 2020-07-27
@sanderu

Why not in ~/.bashrc ?
Add like this:

echo -e "alias host='python3 /home/sanderu/host.py'" >> ~/.bashrc; . ~/.bashrc

Will work as both user and root

R
Rikcon, 2015-02-01
@Rikcon

The question is, are you doing a site only for 1920?

position: relative;
width: 1920px;
margin-top: -100px;
z-index: -1;

on the .slider block
. My screen is 1600 wide, my scorlls will be 100%, what is your task?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question