Pro Windows Subsystem for Linux (WSL) by Hayden Barnes

Pro Windows Subsystem for Linux (WSL) by Hayden Barnes

Author:Hayden Barnes
Language: eng
Format: epub
ISBN: 9781484268735
Publisher: Apress


Boot

Speaking of boot, beginning in Windows 10 build 21286, the ability to run startup commands was added to WSL:[boot]

command = <string>

For example:[boot]

command = apt update && apt upgrade -y

This brand-new feature, as of writing this book, unlocks new potential for running tasks at WSL “boot” time. This can replace clunky scripts previously stored in ~/.bashrc or /etc/profile. The commands are executed as root, allowing high-level changes to the environment. These commands are only run when the WSL is manually launched from the Start Menu or Windows Terminal, so it does not replace the ability to use a Windows Service to run WSL tasks in the background or automate tasks on WSL using Windows Task Scheduler, but it does complement those.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.