WSL = Linux용 Windows 하위 시스템 아키텍쳐(Windows Subsystem for Linux)
윈도우 사용자로써, Linux 시스템을 이용해야할 때가 있다.
이제는 윈도우 자체적으로 WSL 기능을 제공하기 때문에, 보다 편하게 리눅스를 사용할 수가 있게 되었다. 현재는 WSL2가 나와있어서 WSL2로 먼저 설치를 진행하면 된다.
또한 마이크로소프트 스토어에서 자체적으로 제공하는 Windows Terminal을 같이 활용하면 더 편하다. 다른 터미널들도 쓸 수 있고, 아까 설치한 WSL2+Ubuntu로 리눅스 시스템을 현재 사용중이다.
(우분투 버전은 lsb_release라고 치면 확인할 수 있다.)
예전에는 Git Bash를 자주 사용했는데 차이점을 검색해보니 다음과 같다고 한다.
- WSL (Ubuntu) = translates unix kernel instructions into windows
- MINGW (Git Bash) = runs binaries compiled specifically for windows
gitbash contains some standard *nix command line utilities in order to allow git to function in windows.
windows subsystem for linux (wsl) is tooling that allows you to use almost a full linux command line environment within windows (ubuntu just being the most common distro used in conjunction with wsl).
if you want to do linux-y things within windows, wsl is going to give you access to do more.
Git Bash is a collection of GNU utilities compiled for Windows. Those utilities are typically thought of as Linux utilities, although they can run on many OSes.
Ubuntu is a Linux operating system. I think you meant WSL, Windows Subsystem for Linux.
WSL runs Ubuntu on top of an API shim that acts almost exactly like the Linux kernel.
Feature-wise, WSL is better. You can install additional utilities and app easily and Linux scripts just work on it. For large projects Git Bash will be faster, because the WSL API shim is a big I/O. bottleneck.
I'd go with WSL.
Both are entirely different things.
Git Bash is just a combination of Bash (along with gnucoreutils, which includes ls, cat, etc.), which lets you use bash shell and other Unix commands on Windows. It also includes git. Bash is provided along with git because along with git, one requires some other tools like diff, ls, etc. and the Windows counterpart on cmd is not that good.
Bash on Ubuntu on Windows, a.k.a. Windows Subsystem for Linux is an entire Ubuntu Installation on Windows certified by Microsoft. It just not includes bash, but more cool features of Ubuntu like its package manager, software collection. You can install and use any Ubuntu software. It’s not a virtual machine, nor a container. It appears like them, and you can use the analogy for your understanding, but the backend is different, which is why it is named subsystem instead of operating system or virtual machine.
tldr
Git bash gives you standard Linux programs, and git on Windows.
Bash on Ubuntu gives you Ubuntu on Windows, i.e. apt, dpkg, bash, python, gcc, etc.
레딧의 글을 인용했다. 결론은 WSL쓰자라는 것. Git Bash에서 가끔 오류가 날 때가 있는데 WSL을 사용하면 그 오류들이 발생하지 않을 수 있다. 편하게 쓰라고 만들어준 거니 잘 써보도록 하자.
작성 예정 글...
.bashrc에 대해서..
리눅스에서는 conda activate 아니고 source activate...