본문 바로가기

인프라/Linux6

[Linux] 권한 파일 ,디렉토리 (read & write & excute) -rw-rw-r-- 1 egoing egoing 0 Dec 4:23:19 perm.txt // -rw-rw-r-- : access mode // -rw : owner의 권한 , -rw : group의 권한 , -r : other 권한 // r : read , w : write , x:excute // egoing egoing : owner / group 권한 변경 //other 권한 변경 chmode o-r perm.txt chmode o+r perm.txt chmode o+w perm.txt //소유자 권한 chmode u-r perm.txt chmode u+r perm.txt +권한 변경은 h2 db 실행할때 excute 권한을 부여했을때 사.. 2020. 6. 30.
[Linux]다중 사용자 id //나의 정보 who //어떤 사용자가 컴퓨터에 접속해 있는가 ssh -p 3022 didwodn82@localhost //다른컴퓨터에 접속하기 super(root) user VS user 전지전능한 권한 vs 일반 유저 su - root //현재 사용자가 root가 된다. id // 상태 확인 서버를 위해서 사용중이라면 슈퍼유저로 활동 하면 안된다. 일반적으로 일반 유저로 사용하면서 예외적으로 강력한 명령어를 수행하는게 좋은 습관이다 많은 운영체제에서 슈퍼 유저를 막아놓는 경우가 많다. //몇몇 운영체제는 루트사용자를 막아놨다. 그렇기에 rock을 풀어야 한다. sudo passwd -u root //rock 해제 su - root exit sudo passwd -l root //루트사용자를 보안.. 2020. 6. 29.
[Linux]프로세스와 실행 Ctrl + z : 실행중인 프로그램을 백그라운드로 보내는 단축키. fg를 통해서 백그라운드 실행 kill -9 %4 ls -R / > result.txt 2>error.log ls -alR / > result.txt 2> error.log & : &가 명령어 뒤에 붙으면 명령어가 실행될 때 백그라운드로 실행됩니다 데몬 - 항상 켜져있다. ex) 항상 켜져있는 가전제품(전자도어락 , 냉장고) / 필요할때 켜는 가전제품 아파치 웹서버 설치 /etc/init.d -> 데몬 프로그램이 존재하는 위치 //아파치 웹서버 설치 sudo apt-get installl apache2 //실행 sudo service apache2 start //상태 확인 ps aux | grep apache2 //끄기 sudo serv.. 2020. 6. 22.
[Linux] 디렉토리 구조 / 파일 찾는법(find , whereis ) 1. / – Root Every single file and directory starts from the root directory. Only root user has write privilege under this directory. Please note that /root is root user’s home directory, which is not same as /. 2. /bin – User Binaries Contains binary executables. Common linux commands you need to use in single-user modes are located under this directory. Commands used by all the users of the sys.. 2020. 6. 17.