728x90
파일의 Owner 또는 Group을 변경하는 명령어
구문 : chown [OPTIONS] USER[:GROUP] FILE(s)
용례1 : sudo chown root file1.txt
Owner를 root로 변경.
root 로 변경할 경우 sudo 를 앞에 붙인다
용례2 : sudo chown :root file1.txt
Group을 root로 변경.
앞에 :를 붙이면 그룹의 소유자가 변경.
용례3 : sudo chown root:root file1.txt
Owner와 Group을 동시에 변경하려면 owner:group처럼 모두 입력
용례4 : chown -R user:user folder
-R : Recursive
폴더와 그 폴더의 모든 하위 파일들의 소유자들도 함께 변경.
'Ubuntu > linux Command' 카테고리의 다른 글
Linux System Command (du) - 디렉토리 용량 확인 (0) | 2021.08.10 |
---|---|
Linux System Command (netstat) - network statistics (0) | 2021.08.10 |
Linux System Command (touch) (0) | 2021.08.09 |
Linux System Command (ifconfig) - interface configuration (0) | 2021.08.09 |
Linux System Command (route) (0) | 2021.08.09 |