From d25049f3ec82a7eae307a1d256f47f32456fc37a Mon Sep 17 00:00:00 2001 From: leandrom-humanforce Date: Thu, 20 Jul 2023 09:47:03 +1000 Subject: [PATCH] update --- src/.obsidian/workspace.json | 14 +++++++------- ...a permanent PowerShell Alias using Set-Alias.md | 6 ++++++ src/How-to/Run a tool globally on Windows.md | 2 +- src/Tools/Docker Desktop.md | 11 ++++++++++- 4 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 src/How-to/Creating a permanent PowerShell Alias using Set-Alias.md diff --git a/src/.obsidian/workspace.json b/src/.obsidian/workspace.json index 5e595bbbd..0684172da 100644 --- a/src/.obsidian/workspace.json +++ b/src/.obsidian/workspace.json @@ -109,7 +109,7 @@ "state": { "type": "markdown", "state": { - "file": "How-to/Run a tool globally on Windows.md", + "file": "How-to/Creating a permanent PowerShell Alias using Set-Alias.md", "mode": "source", "source": false } @@ -182,7 +182,7 @@ "state": { "type": "backlink", "state": { - "file": "How-to/Run a tool globally on Windows.md", + "file": "How-to/Creating a permanent PowerShell Alias using Set-Alias.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -199,7 +199,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "How-to/Run a tool globally on Windows.md", + "file": "How-to/Creating a permanent PowerShell Alias using Set-Alias.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -222,7 +222,7 @@ "state": { "type": "outline", "state": { - "file": "How-to/Run a tool globally on Windows.md" + "file": "How-to/Creating a permanent PowerShell Alias using Set-Alias.md" } } }, @@ -253,12 +253,13 @@ }, "active": "c6e726f8aada69c0", "lastOpenFiles": [ - "Management/Psychological Safety.md", "How-to/Run a tool globally on Windows.md", + "How-to/Creating a permanent PowerShell Alias using Set-Alias.md", + "Tools/Docker Desktop.md", + "Management/Psychological Safety.md", "Cloud/AWS/Moto.md", "Cloud/AWS/Cognito.md", "Cloud/AWS/Index.md", - "Tools/Docker Desktop.md", "APIs/GitHub API.md", "APIs/Google Calendar API.md", "APIs", @@ -282,7 +283,6 @@ "Management/Culture.md", "Management/Health Monitor.md", "Management/High Performing Teams.md", - "Management/Hiring.md", "Frontend", "How-to/Git", "How-to/Powershell", diff --git a/src/How-to/Creating a permanent PowerShell Alias using Set-Alias.md b/src/How-to/Creating a permanent PowerShell Alias using Set-Alias.md new file mode 100644 index 000000000..f091739df --- /dev/null +++ b/src/How-to/Creating a permanent PowerShell Alias using Set-Alias.md @@ -0,0 +1,6 @@ +To create a permanent PowerShell Alias using the Set-Alias cmdlet, you should add it to your PowerShell profile, which ensures that the alias is available every time you launch PowerShell. + +1. Open the PowerShell profile file in Notepad: `notepad $profile` +2. Add the following line to create a permanent alias: `Set-Alias -Name aliasname -Value command` +3. Save your changes and close Notepad. +4. To ensure that your profile is loaded, run the command: `. $profile` \ No newline at end of file diff --git a/src/How-to/Run a tool globally on Windows.md b/src/How-to/Run a tool globally on Windows.md index ee979de89..34fa6a155 100644 --- a/src/How-to/Run a tool globally on Windows.md +++ b/src/How-to/Run a tool globally on Windows.md @@ -20,4 +20,4 @@ if (!pathVariable.Contains(folderPathToAdd)) pathVariable = $@"{folderPathToAdd};{pathVariable}"; Environment.SetEnvironmentVariable("Path", pathVariable, EnvironmentVariableTarget.Machine); } -``` \ No newline at end of file +``` diff --git a/src/Tools/Docker Desktop.md b/src/Tools/Docker Desktop.md index be6d00eeb..009677dfd 100644 --- a/src/Tools/Docker Desktop.md +++ b/src/Tools/Docker Desktop.md @@ -14,9 +14,18 @@ Docker Desktop for Windows provides a development environment for building, ship 4. Tick the “Start Docker Desktop when you log in“ option 5. Run `systeminfo | find "System Type"` to check if your system is x64 (if so, [download wsl_update_x64.msi](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi)) 6. Run `wsl --set-default-version 2` -7. Run `wsl --install -d Ubuntu` +7. Run `wsl --install -d Ubuntu` (This is optional - Docker will configure `docker-desktop-data` as the default distro) 8. Create a default UNIX user account +### Reinstall Distribution + +``` +wsl --list +wsl --unregister Ubuntu +wsl --list +wsl --install -d Ubuntu +``` + ## WSL Process ![image](https://user-images.githubusercontent.com/5598150/171560772-3528ca14-e4be-40f9-8c7c-9c032c640e6e.png)