г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?
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.