mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-13 23:51:34 +09:00
🐏 Notes : WSL & WinENV fix notes
This commit is contained in:
85
Note/WSL.org
85
Note/WSL.org
@ -7,10 +7,17 @@ WSL1 기반임. WSL2는 네트워크가 불안정해보임.
|
||||
** Windows Function Enable
|
||||
Windows Function enable ()
|
||||
#+begin_src shell
|
||||
# WSL
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
|
||||
# Windows Sandbox (optional)
|
||||
Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online
|
||||
# WSL
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
|
||||
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
|
||||
|
||||
# Install wsl2 kernel
|
||||
wget https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update_x64.msi
|
||||
./wsl_update_x64.msi
|
||||
rm ./wsl_update_x64.msi
|
||||
|
||||
# Windows Sandbox (optional)
|
||||
#Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -Online
|
||||
#+end_src
|
||||
|
||||
** Download and Installation
|
||||
@ -36,7 +43,8 @@ popd
|
||||
|
||||
시작 폴더 =shell:startup= 에 다음의 config.xlaunch 넣으면 좋은듯?
|
||||
#+begin_src shell
|
||||
cp $HOME/.dotfiles/Note/WSL/config.xlaunch $HOME/AppData/Roaming/Microsoft/Windows/"Start Menu"/Programs/Startup/
|
||||
echo "<?xml version=""1.0"" encoding=""UTF-8""?>
|
||||
<XLaunch WindowMode=""Windowed"" ClientMode=""NoClient"" LocalClient=""False"" Display=""10"" LocalProgram=""xcalc"" RemoteProgram=""xterm"" RemotePassword="""" PrivateKey="""" RemoteHost="""" RemoteUser="""" XDMCPHost="""" XDMCPBroadcast=""False"" XDMCPIndirect=""False"" Clipboard=""True"" ClipboardPrimary=""True"" ExtraParams=""-keyhook"" Wgl=""True"" DisableAC=""True"" XDMCPTerminate=""False""/>" > $HOME/AppData/Roaming/Microsoft/Windows/"Start Menu"/Programs/Startup/config.xlaunch
|
||||
#+end_src
|
||||
|
||||
*** Icon Change
|
||||
@ -78,29 +86,6 @@ pacman-key --populate archlinux
|
||||
|
||||
#+end_src
|
||||
|
||||
** Pacman Mirror List
|
||||
WSL1 glibc-2-33-4 이슈가 있음. 마이크로소프트의 WSL1 커널 업데이트를 기대하기 힘든 상황이므로 WSL2를 사용하던지 Update Repo를 2월 14일자로 고정해 놓고 glibc를 업데이트 하면 glibc-2-33-3으로 업데이트됨.
|
||||
#+begin_src shell
|
||||
echo "Server = https://archive.archlinux.org/repos/2021/02/14/\$repo/os/\$arch" > etc/pacman.d/mirrorlist
|
||||
pacman -Sy archlinux-keyring
|
||||
pacman -S glibc
|
||||
#+end_src
|
||||
|
||||
그후 =/etc/pacman.conf= 의 IgnorePkg에 glibc 추가하여 업데이트가 진행되지 않도록 한후 mirrorlist를 최신으로 돌림.
|
||||
#+begin_src config
|
||||
IgnorePkg = fakeroot glibc
|
||||
#+end_src
|
||||
|
||||
한국 서버 우선.
|
||||
#+begin_src shell
|
||||
echo "Server = http://ftp.harukasan.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist
|
||||
echo "Server = https://ftp.harukasan.org/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist
|
||||
echo "Server = http://ftp.lanet.kr/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist
|
||||
echo "Server = https://ftp.lanet.kr/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist
|
||||
echo "Server = http://mirror.premi.st/archlinux/\$repo/os/\$arch" >> /etc/pacman.d/mirrorlist
|
||||
pacman -Syu man wget
|
||||
#+end_src
|
||||
|
||||
** User Addition
|
||||
#+begin_src shell
|
||||
EDITOR=vim visudo # uncomment %wheel ALL=(ALL) ALL
|
||||
@ -114,39 +99,33 @@ Arch.exe 실행파일 있는곳에서 실행. (in powershell)
|
||||
#+end_src
|
||||
** Git
|
||||
#+begin_src shell
|
||||
sudo pacman -S git
|
||||
git config --global user.name "JaeYoo,Im"
|
||||
git config --global user.email "cpu3792@gmail.com"
|
||||
#+end_src
|
||||
|
||||
** Paru (AUR Manager)
|
||||
WSL1에서는 fakeroot-tcp를 사용해야 한다.
|
||||
#+begin_src shell
|
||||
sudo pacman -S base-devel # don't install fakeroot
|
||||
cd ~
|
||||
git clone https://aur.archlinux.org/paru.git
|
||||
cd paru
|
||||
makepkg -si
|
||||
#+end_src
|
||||
** Application
|
||||
#+begin_src shell
|
||||
paru -S openssh python inetutils
|
||||
#+end_src
|
||||
*** Copy Configuration
|
||||
#+begin_src shell
|
||||
paru -S stow
|
||||
sudo pacman -S git stow
|
||||
rm ~/.zshrc
|
||||
rm ~/.bashrc
|
||||
git clone https://github.com/JaeYoo-Im/myDots.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
stow .
|
||||
#+end_src
|
||||
|
||||
** Paru (AUR Manager)
|
||||
WSL1에서는 fakeroot-tcp를 사용해야 한다.
|
||||
#+begin_src shell
|
||||
sudo pacman -S --needed base-devel # don't install fakeroot
|
||||
cd ~
|
||||
git clone https://aur.archlinux.org/paru-bin.git
|
||||
cd paru-bin
|
||||
makepkg -si
|
||||
#+end_src
|
||||
** Application
|
||||
#+begin_src shell
|
||||
paru -S openssh python inetutils
|
||||
#+end_src
|
||||
*** ZSH
|
||||
#+begin_src shell
|
||||
paru -S zsh oh-my-zsh-git zsh-syntax-highlighting zsh-autosuggestions
|
||||
chsh -s /bin/zsh jaeus
|
||||
/usr/share/oh-my-zsh/tools/install.sh
|
||||
mv ~/.zshrc.* ~/.zshrc # overwrite configuration
|
||||
paru -S zsh zsh-syntax-highlighting zsh-autosuggestions
|
||||
# Install oh-my-zsh
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
mv ~/.zshrc.* ~/.zshrc # overwrite configuration
|
||||
#+end_src
|
||||
|
||||
*** TMUX
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="10" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="" Wgl="True" DisableAC="True" XDMCPTerminate="False"/>
|
||||
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
VETHER_IP=$(/bin/grep nameserver /etc/resolv.conf 2> /dev/null | /bin/tr -s ' ' | /bin/cut -d' ' -f2)
|
||||
export DISPLAY=$VETHER_IP:10.0
|
||||
|
||||
emacs
|
||||
|
||||
disown
|
||||
exit
|
||||
@ -26,13 +26,12 @@ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManage
|
||||
** Application
|
||||
*** Base Apps
|
||||
#+begin_src shell
|
||||
choco install powershell-core -y
|
||||
choco install firefox -y
|
||||
choco install vivaldi.install -y
|
||||
choco install git -y
|
||||
choco install git-fork -y
|
||||
choco install dejavufonts -y
|
||||
choco install firacode -y
|
||||
choco install enpass.install -y
|
||||
choco install bitwarden -y
|
||||
#+end_src
|
||||
|
||||
windows에서 기본으로 제공하는 openssh는 proxycommand등의 기능이 지원되지 않는다.
|
||||
@ -48,9 +47,9 @@ windows에서 기본으로 제공하는 openssh는 proxycommand등의 기능이
|
||||
|
||||
git config --global user.name $git_username
|
||||
git config --global user.email $git_email
|
||||
git config --global core.autocrlf true # 저장소로 보낼때 LF로 들여올때 CRLF로 conversion
|
||||
git config --global core.autocrlf true # 저장소로 보낼때 LF로 들여올때 CRLF로 conversion, Windows/Linux 호환용
|
||||
|
||||
git clone https://github.com/JaeYoo-Im/myDots.git $HOME/.dotfiles
|
||||
git clone https://github.com/JaeUs3792/dotfiles $HOME/.dotfiles
|
||||
#+end_src
|
||||
|
||||
*** Neovim
|
||||
@ -67,21 +66,22 @@ Context 메뉴 추가
|
||||
#+begin_src shell
|
||||
# Edit with neovim context menu
|
||||
reg add HKEY_CLASSES_ROOT\*\shell\NeoVim /t REG_SZ /d "Edit with NeoVim..." /f
|
||||
reg add HKEY_CLASSES_ROOT\*\shell\NeoVim /v Icon /t REG_SZ /d "C:\tools\neovim\Neovim\nvim-qt.exe" /f
|
||||
reg add HKEY_CLASSES_ROOT\*\shell\NeoVim\Command /t REG_SZ /d "C:\tools\neovim\Neovim\nvim-qt.exe """"%1""""" /f
|
||||
reg add HKEY_CLASSES_ROOT\*\shell\NeoVim /v Icon /t REG_SZ /d "C:\tools\neovim\Neovim\bin\nvim-qt.exe" /f
|
||||
reg add HKEY_CLASSES_ROOT\*\shell\NeoVim\Command /t REG_SZ /d "C:\tools\neovim\Neovim\bin\nvim-qt.exe """"%1""""" /f
|
||||
#+end_src
|
||||
|
||||
Plugin Manager 설치
|
||||
#+begin_src shell
|
||||
|
||||
md ~\AppData\Local\nvim\autoload
|
||||
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
(New-Object Net.WebClient).DownloadFile(
|
||||
$uri,
|
||||
$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
|
||||
"~\AppData\Local\nvim\autoload\plug.vim"
|
||||
md ~\AppData\Local\nvim\autoload
|
||||
$uri = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
(New-Object Net.WebClient).DownloadFile(
|
||||
$uri,
|
||||
$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(
|
||||
"~\AppData\Local\nvim\autoload\plug.vim"
|
||||
)
|
||||
)
|
||||
)
|
||||
c:\tools\neovim\Neovim\bin\nvim.exe +PlugInstall +q +q
|
||||
#+end_src
|
||||
|
||||
*** Networking
|
||||
@ -133,7 +133,7 @@ rm ./rustup-init.exe
|
||||
**** Python Packages
|
||||
#+begin_src shell
|
||||
choco install python -y
|
||||
$env:Path += ";C:/Python39/Scripts"
|
||||
$env:Path += ";C:/Python310/Scripts"
|
||||
python -m pip install --upgrade pip
|
||||
#pip install wheel
|
||||
#pip install six
|
||||
@ -193,17 +193,18 @@ choco install gnuplot -y
|
||||
|
||||
*** Others
|
||||
#+begin_src shell
|
||||
choco install bandizip -y
|
||||
choco install everything -y
|
||||
choco install sumatrapdf.install -y
|
||||
choco install filezilla -y
|
||||
choco install transgui -y
|
||||
choco install honeyview -y
|
||||
choco install rufus -y
|
||||
choco install pdfsam.install -y
|
||||
choco install bandizip -y
|
||||
choco install everything -y
|
||||
choco install sumatrapdf.install -y
|
||||
choco install filezilla -y
|
||||
choco install transgui -y
|
||||
choco install honeyview -y
|
||||
choco install rufus -y
|
||||
choco install pdfsam.install -y
|
||||
|
||||
choco install dotnetcore-sdk -y
|
||||
choco install powertoys -y
|
||||
choco install powertoys -y
|
||||
|
||||
choco install synctrayzor -y
|
||||
#+end_src
|
||||
* Proxy
|
||||
프록시를 이용하여 특정앱을 업데이트하거나 특정앱의 인터넷접속을 할때 쓰던 방식이다.
|
||||
|
||||
Reference in New Issue
Block a user