Skip to content

Instantly share code, notes, and snippets.

@shikishima
Created December 16, 2021 10:34
Show Gist options
  • Select an option

  • Save shikishima/3e363308852c58b0c0d862a392da2809 to your computer and use it in GitHub Desktop.

Select an option

Save shikishima/3e363308852c58b0c0d862a392da2809 to your computer and use it in GitHub Desktop.
cmdからWSLのリダイレクト処理をワンライナーで呼ぶ
REM 上手くいく
wsl sh -c "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
REM これは失敗する
wsl echo 'nameserver 8.8.8.8' > /etc/resolv.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment