본문 바로가기

Development Note/Ubuntu

우분투에서 맥-윈도우와 파일 공유하는 방법 [How to share files between Ubuntu-Mac-Windows]



 [KOR] 우분투Ubuntu에서 공유폴더를 설정하기 위해서는 우선 Samba를 설치해야 하는데, 여기에는 두 가지 방법이 있습니다. 우분투 소프트웨어 센터를 이용하는 방법과, 터미널을 이용해서 명령어를 입력하는 방법입니다. 이번 포스트에서는 터미널을 통해 설치하는 방법을 알아보겠습니다. 사실 이게 더 쉽기도 합니다. 우분투 12.04 LTS 버전을 기준으로 설명합니다.

 [ENG] To set 'Shared Folder' in Ubuntu, Samba has to be installed on system. There are two ways to install Samba. First way is an installation through Ubuntu Software Center, and second way is an installation through Terminal. In this post, I will introduce second one. Actually terminal way is easier. This post created based on Ubuntu 12.04 LTS.



1. Samba의 설치 [Install]:


#sudo apt-get install samba

#sudo apt-get install samba smbfs

#sudo apt-get install system-config-samba



 [KOR] 마지막 줄에 있는 'system-config-samba' 패키지는 Samba를 GUI로 컨트롤할 수 있는 툴킷 패키지입니다. 이 친구를 설치해 두면 Samba 설정이 굉장히 편리해집니다. 여기까지가 Samba 패키지들을 우분투에 설치하는 과정입니다.

 [ENG] 'system-config-samba' package is the GUI-version Samba control toolkit. This toolkit make Samba setting super-easy.  Now you have just finished installation of Samba packages.





 [KOR] 여기까지 잘 따라오셨다면 아마 시스템에 Samba GUI버전이 설치되었을 겁니다. 클릭해서 열어보면 이런 화면이 나옵니다.

 [ENG] If you followed well, Samba GUI-version should be installed on your System. Double-click it and open it.







 [KOR] 덩그러니 프린터 공유가 등장하는데 프린트는 할 생각이 없으므로 삭제 해 줍니다. 차단모양으로 생긴 버튼이 삭제 버튼입니다.

 [ENG] There is only a Printer shared folder. We don't need it. So delete it. Click 'delete' button which is shaped like 'block'



 [KOR] 기본 사용자가 없는 경우 Preferences > Samba Users 항목을 선택해서 사용자와 비밀번호를 추가 해 줍니다. Samba에서의 사용자는 리눅스 시스템의 사용자와는 별도로 관리됩니다. 따라서 직접 추가하고 별도의 비밀번호를 설정 해 줄 수 있습니다.

 [ENG] In case of no user, Go to [Preferences > Samba Users] and add a new user. Samba User is not equal with System user. They have totally separated. So you can add a new user and change password freely.




 [KOR] 상단의 '추가' 버튼을 눌러서 공유하고 싶은 폴더를 추가합니다. 제 경우에는 편의를 위해 홈 폴더 전체(/home/username/)를 추가했습니다.

 [ENG] Click 'ADD' button to add a new folder. In my case, I added entire Home folder(/home/username/).






 [KOR] 이제 추가된 폴더를 선택하고, 톱니바퀴 모양의 설정 버튼을 누릅니다. Basic 탭에서는 Writable과 Visible을 기호에 따라 선택 해 주시고, Access 탭에서는 액세스를 허용할 사용자를 선택 해 줍니다.

 [ENG] Now select 'added folder', and click sawtooth shaped 'settings' button. In [Basic] tab, choose 'Writable' or 'Visible' attribute by your taste. And in [Access] tab, you should choose user who you want to share your folders.





 [KOR] 이제 모든 설정이 다 끝났으므로, 터미널로 이동해서 다음의 명령어를 입력하여 Samba를 재시작 해 줍니다.

 [ENG] Now all settings are finished. You have to restart Samba in Terminal. Run following commands to restart Samba.


#sudo restart smbd


 [KOR] 이제 맥 파인더의 네트워크 탭에 새로운 호스트가 등장했습니다(윈도우는 탐색기). 클릭해서 조금 전에 만들어 둔 사용자 이름으로 접속합니다.

 [ENG] Now there is new Host on 'Network' tab of Mac Finder(Windows Explorer). Just click it, and log in with username that we made in prior step.





 [KOR] 정상적으로 공유폴더를 볼 수 있고, 설정한 옵션에 따라 자유롭게 쓰기/읽기가 가능한 것을 볼 수 있습니다.

 [ENG] Now you can browse Shared folders normally, And you can write/read freely depend on selected options.





 [KOR] 이제 사용자의 입맛에 맞게 셋팅하는 일만 남았습니다. GUI 버전의 Samba를 이용하면 실수하기 쉬운 터미널 명령어 대신 그래픽 인터페이스로 쉽게 Samba를 설정하고 제어할 수 있습니다.

 [ENG] Now left thing is customized setting. GUI-version Samba make Samba settings much easier.