사용자 도구

사이트 도구


windows:wsl

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
windows:wsl [2018/08/28 09:55]
kwon37xi [Maven/Gradle 등]
windows:wsl [2021/12/31 17:29] (현재)
kwon37xi
줄 2: 줄 2:
   * [[https://docs.microsoft.com/ko-kr/windows/wsl/about|Learn about the Windows Subsystem for Linux | Microsoft Docs]]   * [[https://docs.microsoft.com/ko-kr/windows/wsl/about|Learn about the Windows Subsystem for Linux | Microsoft Docs]]
   * Windows 10 이상에서 Ubuntu 등의 리눅스를 Native 처럼 깔아서 사용 가능하다.   * Windows 10 이상에서 Ubuntu 등의 리눅스를 Native 처럼 깔아서 사용 가능하다.
 +  * [[https://docs.microsoft.com/ko-kr/windows/wsl/wsl2-install|WSL 2 install]]
 +  * https://github.com/microsoft/WSL
   * [[https://www.howtogeek.com/261383/how-to-access-your-ubuntu-bash-files-in-windows-and-your-windows-system-drive-in-bash/|How to Access Your Ubuntu Bash Files in Windows (and Your Windows System Drive in Bash)]]   * [[https://www.howtogeek.com/261383/how-to-access-your-ubuntu-bash-files-in-windows-and-your-windows-system-drive-in-bash/|How to Access Your Ubuntu Bash Files in Windows (and Your Windows System Drive in Bash)]]
   * [[https://gist.github.com/wsargent/072319c2100ac0aea4305d6f6eeacc08|Windows Development Environment for Scala]]   * [[https://gist.github.com/wsargent/072319c2100ac0aea4305d6f6eeacc08|Windows Development Environment for Scala]]
   * [[https://github.com/goreliu/wsl-terminal|goreliu/wsl-terminal: Terminal emulator for Windows Subsystem for Linux (WSL)]]   * [[https://github.com/goreliu/wsl-terminal|goreliu/wsl-terminal: Terminal emulator for Windows Subsystem for Linux (WSL)]]
   * [[https://blog.ropnop.com/configuring-a-pretty-and-usable-terminal-emulator-for-wsl/|Configuring a pretty and usable terminal emulator for WSL]]   * [[https://blog.ropnop.com/configuring-a-pretty-and-usable-terminal-emulator-for-wsl/|Configuring a pretty and usable terminal emulator for WSL]]
 +  * [[https://docs.microsoft.com/ko-kr/windows/wsl/install-win10|Windows 10에 WSL(Linux용 Windows 하위 시스템) 2 설치 | Microsoft Docs]]
 +  * [[https://wslhub.com/|W$L/hub>_]]
 +  * [[https://devblogs.microsoft.com/commandline/a-preview-of-wsl-in-the-microsoft-store-is-now-available/|A preview of WSL in the Microsoft Store is now available! - Windows Command Line]]
 +
 +===== 원하는 배포판 설치 =====
 +  * [[windows:wsl:wsldl|windows:wsl:wsldl]]
 +  * [[https://docs.microsoft.com/en-us/windows/wsl/use-custom-distro#use-a-custom-linux-distribution|Import any Linux distribution to use with WSL | Microsoft Docs]]
 +  * Windows Store 에 없더라도 원하는 배포판을 설치할 수 있다.
 +  * [[https://docs.rockylinux.org/guides/interoperability/import_rocky_to_wsl_howto/|Import to WSL2 with Docker - Documentation]]
 +  * [[https://docs.rockylinux.org/guides/interoperability/rocky_to_wsl_howto/|Import To WSL with WSL and rinse - Documentation]]
  
 ===== 설치 ===== ===== 설치 =====
줄 11: 줄 23:
   * Unicode Locale 지정<code sh>   * Unicode Locale 지정<code sh>
 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
 +</code>
 +
 +===== Upgrade =====
 +  * 16.04 -> 18.04 업그레이드가 가능하다. [[https://superuser.com/questions/1317619/can-i-upgrade-my-existing-ubuntu-installation-in-wsl-from-16-04-to-18-04|windows subsystem for linux - Can I upgrade my existing Ubuntu installation in WSL from 16.04 to 18.04? - Super User]]
 +  * [[https://blogs.msdn.microsoft.com/commandline/2018/07/09/upgrading-ubuntu/|A Guide to Upgrading your Ubuntu App’s Release – Windows Command Line Tools For Developers]]
 +
 +<code sh>
 +# 기본적으로는 아래 명령만으로 가능.
 +sudo do-release-upgrade -d
 +
 +lsb_release -a # 버전 검사
 </code> </code>
  
줄 19: 줄 42:
   * 위 외에도 ''Ahnlab Safe Transaction'', ''nProtect'' 등의 강제로 설치되는 보안툴 때문일 수도 있다.   * 위 외에도 ''Ahnlab Safe Transaction'', ''nProtect'' 등의 강제로 설치되는 보안툴 때문일 수도 있다.
   * 그래도 느린 느낌이라 결국 ''oh-my-bash'' 같은 것은 사용하지 않고 기본 [[:git|git]] Git + Color prompt 를 사용하고 있음.   * 그래도 느린 느낌이라 결국 ''oh-my-bash'' 같은 것은 사용하지 않고 기본 [[:git|git]] Git + Color prompt 를 사용하고 있음.
 +
 +===== .bashrc, .bash_profile =====
 +  * ''.bash_profile''을 만들것이라면, 무조건 아래 항목이 있어야 ''.bashrc''를 로딩한다.
 +
 +<code sh>
 +if [[ -f ~/.bashrc ]] ; then
 +        . ~/.bashrc
 +fi
 +</code>
 +
 ===== Console ===== ===== Console =====
   * [[https://github.com/rprichard/wslbridge|wslbridge]] linux bash 콘솔을 Windows 콘솔과 통합해주는 중계자.   * [[https://github.com/rprichard/wslbridge|wslbridge]] linux bash 콘솔을 Windows 콘솔과 통합해주는 중계자.
줄 27: 줄 60:
 ===== ssh-agent 대체 ===== ===== ssh-agent 대체 =====
   * [[windows:wsl:weasel_pageant|Weasel Pageant - WSL Linux ssh-ageant to putty pageant]]   * [[windows:wsl:weasel_pageant|Weasel Pageant - WSL Linux ssh-ageant to putty pageant]]
 +
 ===== Maven/Gradle 등 ===== ===== Maven/Gradle 등 =====
   * 아래 하지 말 것. File Lock 문제로 실제로 사용하기 힘듬.   * 아래 하지 말 것. File Lock 문제로 실제로 사용하기 힘듬.
줄 32: 줄 66:
   * wsl 설치 후 [[java:maven:settings|Maven 설정]] ''settings.xml''   * wsl 설치 후 [[java:maven:settings|Maven 설정]] ''settings.xml''
   * [[:gradle|Gradle]]의 사용자 디렉토리(''GRADLE_USER_HOME'') Windows와 맞춰준다.   * [[:gradle|Gradle]]의 사용자 디렉토리(''GRADLE_USER_HOME'') Windows와 맞춰준다.
 +
 +===== 상호 실행 =====
 +  * Windows 에서 linux 명령실행, Linux에서 Windows 명령 실행이 가능하다.
 +  * [[https://docs.microsoft.com/en-us/windows/wsl/interop|Windows interoperability with Linux | Microsoft Docs]]
 +
 +<code sh>
 +C:\> wsl ls -lah
 +</code>
  
 ===== 주의 ===== ===== 주의 =====
줄 42: 줄 84:
   * [[https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/|Windows 10 Creators Update: What’s new in Bash/WSL & Windows Console – Windows Command Line Tools For Developers]]   * [[https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/|Windows 10 Creators Update: What’s new in Bash/WSL & Windows Console – Windows Command Line Tools For Developers]]
  
 +===== 참조 ===== 
 +  * [[https://www.howtogeek.com/fyi/windows-10-will-finally-offer-easy-access-to-linux-files/|Windows 10 Will Finally Offer Easy Access to Linux Files]] 
 +  * [[https://cepa.io/2018/02/10/linuxizing-your-windows-pc-part1/|WSL1 기준 Linux'izing your Windows PC into a dev machine – Part 1 | cepa.io]] 
 +  * [[https://cepa.io/2018/02/20/linuxizing-your-windows-pc-part2/|WSL1 기준 Linux'izing your Windows PC into a dev machine – Part 2 | cepa.io]] 
 +  * [[https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10|How to Install WSL 2 on Windows 10 (Updated) - OMG! Ubuntu!]]
windows/wsl.1535417757.txt.gz · 마지막으로 수정됨: 2018/08/28 09:55 저자 kwon37xi