Linux 직접만든 .sh 의 sudo command not found

2022. 9. 26. 18:22·Study/Linux

https://stackoverflow.com/questions/12996397/command-not-found-when-using-sudo

 

Command not found when using sudo

I have a script called foo.sh in my home folder. When I navigate to this folder, and enter ./foo.sh, I get -bash: ./foo.sh: Permission denied. When I use sudo ./foo.sh, I get sudo: foo.sh:

stackoverflow.com

$ chmod +x foo.sh 

sudo 로 실행해도 실행파일의 실행권한이 없어서 command 를 찾을 수 없다고 뜨는 경우가 있음

chomod 로 실행권한 추가

'Study > Linux' 카테고리의 다른 글

'Error: Could not find or load main class' 자바관련 에러  (0) 2022.12.06
E: Unable to locate package  (0) 2022.09.02
Centos 폰트 설치  (0) 2022.08.18
명령어 모음  (0) 2022.08.05
Remote host identification has changed  (0) 2022.06.13
'Study/Linux' 카테고리의 다른 글
  • 'Error: Could not find or load main class' 자바관련 에러
  • E: Unable to locate package
  • Centos 폰트 설치
  • 명령어 모음
_WooHyun_
_WooHyun_
  • _WooHyun_
    Nerd
    _WooHyun_
  • 전체
    오늘
    어제
    • 분류 전체보기 (79)
      • Study (60)
        • Algorithm (24)
        • Unreal Engine (19)
        • C++ (1)
        • Maya (1)
        • GoLang (3)
        • Mysql (3)
        • Linux (7)
        • Server (2)
      • Projects (0)
        • Unreal Engine (0)
        • Server (0)
      • 개발일지 (8)
        • Unreal Engine (7)
        • Art (1)
        • Server (0)
      • 미래 (5)
      • 개발아이디어 (0)
      • 잡지식 (2)
  • 블로그 메뉴

    • 홈
    • 방명록
    • 글쓰기
    • 블로그설정
  • 링크

    • GitHub
  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
_WooHyun_
Linux 직접만든 .sh 의 sudo command not found
상단으로

티스토리툴바