# Linux
{{tag>os linux}}
## 문서
- [[리눅스에서 폴더 통째로 복사하기]]
- [[리눅스에서 iso 이미지 파일 마운트하기]]
- [[AIX 명령어]]
- [[Bash 쉘에서 빈 문자열 체크하기]]
## 리눅스 기본 명령어
용량확인: df -h
# 파일 시스템
## 속성
* Access time - atime
* 파일을 열거나 접근한 시간
* Change time - ctime
* 파일 정보가 변경된 시간(속성이나 퍼미션이 변경)
* Modify time - mtime
* 파일의 내용이 변경된 시간
# 명령어
## find
소유자가 없는 파일과 디렉토리를 체크
# find / -nouser -o -nogroup -print
# 보안강화
## sysctl.conf
### ICMP redirects 를 허용하지 않는다
net.ipv4.conf.eth0.accept_redirects=0
net.ipv4.lo.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.accept_redirects=0
### 게이트웨이로부터의 redirect를 허용하지 않음으로써 스푸핑을 막는다
net.ipv4.conf.eth0.secure_redirects=0
net.ipv4.lo.secure_redirects=0
net.ipv4.conf.default.secure_redirects=0
net.ipv4.conf.all.secure_redirects=0
### syncookie 가 작동할 때 SYN flooding 공격이 있으면 messages 파일에 공격당하는 내용이 출력된다.
net.ipv4.tcp_syncookies=1
## 설정
리눅스 시스템에서 ping을 이용한 도스(DoS) 공격을 방어하기 위한 옵션과 파일
* 차단하기
* echo 1 > /proc/sys/net/ipv4/icmp\_echo\_ignore\_all
* 해제하기
* echo 0 > /proc/sys/net/ipv4/icmp\_echo\_ignore\_all