
문제:
설치했지만 명령줄에 sl
입력하면 다음과 같은 결과가 나타납니다.sl
bash: sl: command not found
(root@host)-(03:55:38)-(/home/user)
$apt install sl
Reading package lists... Done
Building dependency tree
Reading state information... Done
sl is already the newest version (3.03-17+b2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Sl은 실수로 'sl'을 입력한 경우 사용자를 교정하기 위한 애니메이션을 표시할 수 있는 프로그램입니다. SL은 증기 기관차를 의미합니다. 데비안 패키지의 패키지
발췌:
Steam Locomotive를 얻으려면 sl 소프트웨어를 설치하십시오(쉘에서 훈련).
Debian
/ Ubuntu Linux 에서 다음 apt-get 명령/apt 명령을 입력하십시오 .
$ sudo apt-get install sl
용법
좋습니다. ls 명령을 sl로 잘못 입력했습니다.
$ sl
(root@host)-(03:57:47)-(/home/user)
$cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
(root@host)-(04:04:01)-(/home/user)
$bash -version
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
질문:
여기서 무슨 일이 일어나고 있는지, 기관차는 어디에 있는지, 구성해야 할 것이 있나요......?
답변1
다음으로 실행하는 경우 root
(직접 실행했기 때문에 그럴 수도 있음 apt
) 기본적으로 다음 의 조건부로 인해 PATH
제외됩니다 ./usr/local/games
/usr/games
/etc/profile
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
export PATH
sl
에 있는 일이 발생합니다 /usr/games
.