BIND

Category
아이템: 
포스트 갯수1

리눅스에서 특정 디렉토리를 다른 디렉토리에 마운트(mount)하기 (--bind 옵션)

By 반달가면 | 2019년 5월 11일 | 
특정한 디렉토리를 다른 디렉토리에 마운트(mount)해서 양쪽 디렉토리가 같은 곳으로 연결되도록 할 수 있다. mount에서 --bind 옵션을 사용하면 된다. 예를 들어 /home/john/data 디렉토리를 /home/jane/data_from_john 디렉토리에 연결하는 경우다. mount를 사용하므로 심볼릭 링크(symbolic link)와 달리 루트 권한을 필요로 한다. # /home/john/data 디렉토리를 /home/jane/data_from_john에 마운트 sudo mount --bind /home/john/data /home/jane/data_from_john 마운트를 해제하려면 umount를 사용. # 마운트 해제 sudo umount /home/jane/da