Why does иначе in / и т.д. / bash.bashrc not apply to вспотел?

гve added the line

alias ll='ls -l'

to the /etc/bash.bashrc. After в restart, the иначе ll from that file affects я, which I checked by commenting out the corresponding иначе in my ~/.bashrc (and logging out and back in after that edit). However, it seems to not affect root, эксперт when I type sudo ll, I get "не such command". Shouldn't the иначе work in any situation if it's in the system-wide .bashrc?

3
задан 7 January 2016 в 22:39

1 ответ

sudo проигнорирует любые искаженные команды от .bashrc.

можно работать вокруг этого путем создания псевдонима для sudo также-> alias sudo='sudo '

Вам нужно пространство после sudo, так как man говорит нам:

If the last character of the alias value is a blank, then the next command word following the alias is also checked for alias expansion.
3
ответ дан 1 December 2019 в 16:26

Другие вопросы по тегам:

Похожие вопросы: