작성
·
299
0
기본적인 명령어는 잘 되는데요 ls, pwd
따로 미리 설치한 node 나 pm2 등 이런 명령어들은 /bin/sh:
command not found 로 뜨는데 이유를 알 수 있을까요?
답변 3
0
아 그러면 두가지 방법으로 가능할 것 같은데요.
소스코드를 고치거나, 직접 /usr/local/bin을 호출하거나요.
테스트가 필요할꺼 같긴 한데..bashrc에 source를 추가하는 것도 가능할수도 있겠네요.
이 중에 원하시는 해결책이 있을까요?
0
0
아...어떤 것을 수행했을때는 주시면 좀더 정확하게 답변 드릴수 있을 것 같긴 한데..
command 대신에 shell로 해보시면 어떨까요?
/bin/sh에 있는 것을 읽어들여서 실행하는 건 shell을 통해서 가능해서요.
좀더 궁금하시면 아래의 내용을 읽어보셔도 가능합니다 :)
만약에 shell로 잘 안되면, 실행했던 내용을 주시면 다시 봐드릴께요!!
====== 출처: https://blog.confirm.ch/ansible-modules-shell-vs-command/ ====
A typical example are the Ansible modules Shell and Command. In the most use cases both modules lead to the same goal. Here are the main differences between these modules.