경로를 입력 할 필요없이 터미널의 어느 곳에서나 C 프로그램을 활성화 할 수 있기를 원합니다. 그래서 대신 :
[some_text]:~ [username]$ ./[insert_c_executable]
또는:
[some_text]:~ [username]$ Documents/Folder1/Folder2/.../[insert_c_executable]
프로그램 ls
이나 pwd
다음 과 같이 이렇게 할 수 있습니다 .
[some_text]:~ [username]$ [some_cool_app_name]
다음 링크에서 유용한 답변을 보았습니다 : https://askubuntu.com/questions/229589/how-to-make-a-file-ega-sh-script-executable-so-it-can-be- ran-from-termina / 229592 # 229592? newreg = 549425fc915d44d19a1e9be81f0172b7
그러나 .bashrc 나 bash_profile은 내 홈 디렉토리 (OS X가 설치된 Mac에서)에서 사용할 수 없습니다. 나는 평판이 충분하지 않기 때문에 그 질문에 대해 언급 할 수 없습니다. 어떤 도움이라도 대단히 감사하겠습니다!
mv path/to/your/executable_file /usr/local/bin/your_desied_command
예제 mv composer.phar / usr / local / bin / composer
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다