Skip to content

Instantly share code, notes, and snippets.

@shigenobuokamoto
Last active August 7, 2024 19:43
Show Gist options
  • Save shigenobuokamoto/30dcee0e2d9045d1b18928d96178ed2e to your computer and use it in GitHub Desktop.
Save shigenobuokamoto/30dcee0e2d9045d1b18928d96178ed2e to your computer and use it in GitHub Desktop.
/etc/systemd/system/wsl-persistent.service
[Unit]
[Service]
ExecStart=/bin/sh -ec 'exec /mnt/c/windows/system32/waitfor.exe WSL$(date +%\\s)'
[Install]
WantedBy=multi-user.target
@shigenobuokamoto
Copy link
Author

sudo curl -o /etc/systemd/system/wsl-persistent.service https://gist.githubusercontent.com/shigenobuokamoto/30dcee0e2d9045d1b18928d96178ed2e/raw/48388fb1d4aee8ee6aee5d624a4e4e104dae087e/wsl-persistent.service
sudo systemctl daemon-reload
sudo systemctl --now enable wsl-persistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment