반응형
    
    
    
  
ubuntu@ubuntu8:~$ vi .profile최하단에 아래 코드 추가
 28 if [ -f /mnt/nfs.sh ] ; then
 29     . /mnt/nfs.sh
 30 fi
ubuntu08@ubuntu08-VirtualBox:/mnt$  sudo cd /mnt ; sudo mkdir lect_nfs
ubuntu08@ubuntu08-VirtualBox:/mnt$ sudo chmod 777 lect_nfs
ubuntu08@ubuntu08-VirtualBox:/mnt$ sudo vi nfs.sh
#!/bin/bash
SERVIP=10.10.15.71
if ! df | grep lect_nfs > /dev/null ; then
        ping -c 1 $SERVIP > /dev/null
        if [ $? -eq 0 ] ; then
                        sudo mount -t nfs $SERVIP:/srv/lect_nfs /mnt/lect_nfs
                        df | grep lect_nfs
        fi
fi
nfs 서버의 주소를 넣어주고 폴더 경로를 알맞게 세팅해준다.

아래 명령어를 쳐서 mount 시키든 아니면 putty 세션 새롭게 열어서 확인하든 다 괜춘
ubuntu08@ubuntu08-VirtualBox:~$ sudo mount -t nfs 10.10.15.71:/srv/lect_nfs /mnt/lect_nfs
ubuntu08@ubuntu08-VirtualBox:~$ df
반응형
    
    
    
  'Ubuntu' 카테고리의 다른 글
| Ubuntu TCP/IP 단체 채팅 프로그램 (0) | 2024.02.20 | 
|---|---|
| IPC(Inter-Process-Communication) C언어 실습 (0) | 2024.02.19 | 
| [Jetson Nano] 젯슨 나노 OS 이미지 올리기 (1) | 2024.02.16 | 
| [Linux BSP] Ubuntu에서 RaspberryPi U-Boot 어셈블리 코드 추가 (1) | 2024.02.13 | 
| [ubuntu] ssd에 rufus를 활용한 Ubuntu 설치 (1) | 2024.02.12 | 
 
                    
                  