From 5bdbcaac809cc707e464bdc555c84e03ef69948a Mon Sep 17 00:00:00 2001 From: bryan Date: Sat, 27 Feb 2021 13:03:46 -0500 Subject: [PATCH] Update WSL2 article with service info --- ...8-external-wsl2-access-ubuntu-20-w-powershell.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/blog.bryanroessler.com/_posts/2021-02-18-external-wsl2-access-ubuntu-20-w-powershell.md b/blog.bryanroessler.com/_posts/2021-02-18-external-wsl2-access-ubuntu-20-w-powershell.md index e39cd1d..77c5bf7 100644 --- a/blog.bryanroessler.com/_posts/2021-02-18-external-wsl2-access-ubuntu-20-w-powershell.md +++ b/blog.bryanroessler.com/_posts/2021-02-18-external-wsl2-access-ubuntu-20-w-powershell.md @@ -36,15 +36,14 @@ Steps: You can use your `.bashrc` in the WSL2 or simply append the following line to the beginning of your powershell task: -`bash.exe -c "sudo /usr/sbin/service ssh start && sudo /usr/sbin/service unattended-upgrades start"` +`bash.exe -c "sudo /usr/sbin/service ssh start; sudo /usr/sbin/service unattended-upgrades start"` -You can add or remove services as necessary. In order to be able to use root privileges without entering a password, you will need to edit the sudoers file using `visudo` and adding the following line: +You can add or remove services as necessary. In order to be able to use root privileges without entering a password, you will need to edit the sudoers file using **`visudo`** and adding the following lines: -`%sudo ALL=NOPASSWD: /usr/sbin/service` - -You can optionally substitute your username for ALL for more granularity. - -## +```(bash) +bryan ALL = NOPASSWD: /usr/sbin/service start ssh +bryan ALL = NOPASSWD: /usr/sbin/service start unattended-upgrades +``` ## Troubleshooting