0. 환경
- Rocky Linux 9
- 인터넷 연결 가능
- cifs-utils 설치 되어있음
dnf install cifs-utils- 마운트 할 위치는 /test
- 계정 정보는 /cred/.credential
1. 임시 설정 - mount 명령어
mount -t cifs -o username=<사용자명> //<파일서버주소> <마운트할위치>-
mount 옵션
- -t : 파일시스템 지정. 여기서는 cifs를 사용
- -o : 마운트 옵션을 사용
-
예시
mount -t cifs -o username=user //192.168.10.25/data /test2. 영구 설정 - fstab 수정
- fstab 수정
vi /etc/fstab- 마지막 줄에 아래 추가
//<서버IP주소>/<마운트할폴더> <마운트될위치> cifs credentials=<계정정보위치> 0 0- 예시
//192.168.10.25/data /test cifs credentials=/cred/.credential 0 0