Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

Windows上のUbuntu(WSL/Docker)からmoshをつかう

やたらと苦労したので、メモ

公式の方ではChrome拡張を推奨しているのですが、どういう訳か手元では動かず
仕方がないのでWSLやDockerのUbuntuで接続してみることに

実際のところ

共通

$ sudo apt install mosh

Ubuntu on WSL2

$ mosh  pi@192.168.3.5


切断テスト

Ubuntu on Docker

こちらは最小構成のImageを使ったからか、少し工夫が必要でした

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "UTF-8",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "UTF-8",
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

などと言って怒られるので、新たに環境変数群を再設定

echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8
$ mosh  pi@192.168.3.5


同じく切断テスト