본문 바로가기
[OS]/우분투

윈도우즈에서 리눅스 설치 - WSL(Ubuntu)

by control+c 2020. 5. 8.
반응형

윈도우 개발환경설정 

https://ubuntu.com/wsl

 

우리가 맥에서의 개발이 편하다고 느낀건 shell에 직접 접근하여 리눅스명령어를 통해 개발환경을 구축하고 운영할수 있었기 때문입니다. 

윈도우는 리눅스와 다른 체계를 통해 개발 환경 구축시 개발자가 이질감을 느낄수 밖에 없었습니다. 

그래서 WSL이라는 기술을 통해 windows에서도 Linux 터미널에 액세스하여 Linux 응용 프로그램 및 워크 플로를 실행할 수 있습니다.

WSL은 WSL1과 WSL2가 존재하지만 저는 안정화버전인 WSL1을 설치하려고합니다. WSL2에는 아직 기능적인 이슈가 존재하고, 특히 Windows Insider Program에 가입해야하고, 강제로 beta버전의 윈도우10 빌드를 사용하므로써 윈도우 자체가 불안정해지는 이슈가 존재한다는 여러 글들을 봐서 그렇다. 물론 기능상으로는 WSL2가 좋을거 같긴하다. 

https://ubuntu.com/wsl

 

windows10에 우분투 설치방법

1. 관리자 권한으로 PowerShell을 실행

아래 명령어 실행후 RestartNeeded : True 일때 Windows 재시작

PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux                                

Path          :
Online        : True
RestartNeeded : False

2. 우분투 설치

www.microsoft.com/store/productId/9NBLGGH4MSV6

 

Get Ubuntu - Microsoft Store

Download this app from Microsoft Store for Windows 10. See screenshots, read the latest customer reviews, and compare ratings for Ubuntu.

www.microsoft.com

3. Ubuntu 실행 및 세팅

Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: jojonari
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.4.0-18362-Microsoft x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri May  8 22:42:31 KST 2020

  System load:    0.52      Processes:             7
  Usage of /home: unknown   Users logged in:       0
  Memory usage:   14%       IPv4 address for eth0: 192.168.75.253
  Swap usage:     0%        IPv4 address for eth1: 172.18.112.193

0 updates can be installed immediately.
0 of these updates are security updates.


The list of available updates is more than a week old.
To check for new updates run: sudo apt update


This message is shown once once a day. To disable it please create the
/home/jojonari/.hushlogin file.
jojonari@JOJONARI-PC:~$ ls
jojonari@JOJONARI-PC:~$ ll
total 8
drwxr-xr-x 1 jojonari jojonari  512 May  8 22:42 ./
drwxr-xr-x 1 root     root      512 May  8 22:42 ../
-rw-r--r-- 1 jojonari jojonari  220 May  8 22:42 .bash_logout
-rw-r--r-- 1 jojonari jojonari 3771 May  8 22:42 .bashrc
drwxr-xr-x 1 jojonari jojonari  512 May  8 22:42 .landscape/
-rw-rw-rw- 1 jojonari jojonari    0 May  8 22:42 .motd_shown
-rw-r--r-- 1 jojonari jojonari  807 May  8 22:42 .profile
jojonari@JOJONARI-PC:~$ ps
  PID TTY          TIME CMD
   46 tty1     00:00:00 bash
  110 tty1     00:00:00 ps
jojonari@JOJONARI-PC:~$ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
jojonari@JOJONARI-PC:~$ sudo apt-get update
[sudo] password for jojonari:

 

반응형

댓글