Skip to content

Instantly share code, notes, and snippets.

@TeroKeso
Last active June 17, 2022 19:52
Show Gist options
  • Save TeroKeso/c4dfabc493f0bb93f13d09d107d8040c to your computer and use it in GitHub Desktop.
Save TeroKeso/c4dfabc493f0bb93f13d09d107d8040c to your computer and use it in GitHub Desktop.
Tailscale inside WSL2

Tailscale works with WSL2

1) sudo nano /etc/hostname
2) exit
3) install tailscale "curl -fsSL https://tailscale.com/install.sh | sh"
4) sudo tailscaled &
5) sudo tailscale up
5.5) sudo tailscale up #if needed
6) sudo tailscale status

Done :)
"
A simple alternative could be to add this to your ~/.bashrc file.
(re-login required, or source ~/.bashrc)

# Starting Tailscale daemon automatically if not running...
RUNNING=`ps aux | grep tailscaled | grep -v grep`
if [ -z "$RUNNING" ]; then
    sudo tailscaled > /dev/null 2>&1 &
    disown
fi
I also use this approach for starting Docker (without Docker-Desktop).
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment