diff --git a/windows.md b/windows.md index 99c52f3..35bc996 100644 --- a/windows.md +++ b/windows.md @@ -29,32 +29,35 @@ With those compatibility things out of the way, you're ready to start the system

This will run Powershell as an administrator user

-3. Copy the following text (be sure you select all of it, it's very long) and right-click in the blue middle part of the PowerShell window to paste the text. Hit enter.

+3. Copy the following text and right-click in the blue middle part of the PowerShell window to paste the text. Hit enter.

```bash - Set-ExecutionPolicy AllSigned -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + winget source update ``` - This will install Chocolatey, a package manager which will allow us to install and uninstall programs from the command line. + This checks that WinGet is available and updates its sources.
-4. The installer will take a bit of time and then show a message that "Chocolatey is ready", signaling that it is done:

-

-5. Close PowerShell and open it again as administrator (like in step 2)

-6. Copy the following text and right-click in the blue middle part of the PowerShell window to paste the text. Hit enter.

+4. Copy each line of the following text and right-click in the blue middle part of the PowerShell window to paste the text. Hit enter after each line.

```bash - choco install git nodejs-lts strawberryperl vscode hyper httpie-desktop flyctl --yes + winget install --id Git.Git --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id OpenJS.NodeJS.LTS --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id StrawberryPerl.StrawberryPerl --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id Microsoft.VisualStudioCode --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id Vercel.Hyper --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id HTTPie.Desktop --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id Fly-io.flyctl --exact --source winget --accept-package-agreements --accept-source-agreements ``` - This uses Chocolatey to install Git, Node.js, Strawberry Perl, Visual Studio Code, Hyper, HTTPie Desktop and `flyctl`.

+ This uses WinGet to install Git, Node.js, Strawberry Perl, Visual Studio Code, Hyper, HTTPie Desktop and `flyctl`.

If you don't have Zoom installed yet, run this to install it:
```bash - choco install zoom --yes + winget install --id Zoom.Zoom --exact --source winget --accept-package-agreements --accept-source-agreements ``` If you don't have Slack installed yet, run this to install it:
```bash - choco install slack --yes + winget install --id SlackTechnologies.Slack --exact --source winget --accept-package-agreements --accept-source-agreements ``` -7. Now we will configure Hyper.

+5. Now we will configure Hyper.

Open Hyper and then select Edit -> Preferences, which will open a text file in an editor:



In this file, we will do three things: @@ -64,7 +67,7 @@ With those compatibility things out of the way, you're ready to start the system Then save the file and close and restart Hyper. -8. To verify that the Hyper configuration was successful, copy the following text, paste it into Hyper and hit return: +6. To verify that the Hyper configuration was successful, copy the following text, paste it into Hyper and hit return: ```bash echo -e "Hyper Config:\n Shell: $SHELL\n Terminal: $TERM" @@ -80,7 +83,7 @@ With those compatibility things out of the way, you're ready to start the system Check your output carefully - if line 2 (`Shell: ...`) and line 3 (`Terminal: ...`) on your screen aren't exactly the same as the output above, return to the previous step and check if everything was completed fully. -9. Search for Hyper in the start menu, then right click on it and choose "Run as Administrator". Copy each line of the following text, paste it in Hyper and hit return.

+7. Search for Hyper in the start menu, then right click on it and choose "Run as Administrator". Copy each line of the following text, paste it in Hyper and hit return.

```bash corepack enable @@ -146,50 +149,51 @@ With those compatibility things out of the way, you're ready to start the system -10. Copy the following text, paste it in Hyper and hit return. +8. Copy each line of the following text, paste it in Hyper and hit return. - ```bash - choco install python visualstudio2022-workload-vctools --yes - ``` + ```bash + winget install --id Python.Python.3.12 --exact --source winget --accept-package-agreements --accept-source-agreements + winget install --id Microsoft.VisualStudio.2022.BuildTools --exact --source winget --accept-package-agreements --accept-source-agreements --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" + ``` - This may take some time (possibly up to 15-20 minutes). This uses Chocolatey to install Python and Visual Studio build tools, which are required for installing Node.js native modules. + This may take some time (possibly up to 15-20 minutes). This uses WinGet to install Python and Visual Studio build tools, which are required for installing Node.js native modules. -11. Copy each line of the following text, paste it in Hyper and hit return.

+9. Copy each line of the following text, paste it in Hyper and hit return.

- ```bash - code --install-extension bradlc.vscode-tailwindcss - code --install-extension Cardinal90.multi-cursor-case-preserve - code --install-extension dbaeumer.vscode-eslint - code --install-extension dozerg.tsimportsorter - code --install-extension esbenp.prettier-vscode - code --install-extension frigus02.vscode-sql-tagged-template-literals-syntax-only - code --install-extension kumar-harsh.graphql-for-vscode - code --install-extension mattpocock.ts-error-translator - code --install-extension meganrogge.template-string-converter - code --install-extension styled-components.vscode-styled-components - code --install-extension stylelint.vscode-stylelint - code --install-extension sysoev.vscode-open-in-github - code --install-extension tamasfe.even-better-toml - code --install-extension unional.vscode-sort-package-json - code --install-extension viijay-kr.react-ts-css - code --install-extension vitaliymaz.vscode-svg-previewer - code --install-extension vunguyentuan.vscode-css-variables - code --install-extension wix.glean - ``` + ```bash + code --install-extension bradlc.vscode-tailwindcss + code --install-extension Cardinal90.multi-cursor-case-preserve + code --install-extension dbaeumer.vscode-eslint + code --install-extension dozerg.tsimportsorter + code --install-extension esbenp.prettier-vscode + code --install-extension frigus02.vscode-sql-tagged-template-literals-syntax-only + code --install-extension kumar-harsh.graphql-for-vscode + code --install-extension mattpocock.ts-error-translator + code --install-extension meganrogge.template-string-converter + code --install-extension styled-components.vscode-styled-components + code --install-extension stylelint.vscode-stylelint + code --install-extension sysoev.vscode-open-in-github + code --install-extension tamasfe.even-better-toml + code --install-extension unional.vscode-sort-package-json + code --install-extension viijay-kr.react-ts-css + code --install-extension vitaliymaz.vscode-svg-previewer + code --install-extension vunguyentuan.vscode-css-variables + code --install-extension wix.glean + ``` - This installs some VS Code extensions we will need.

+ This installs some VS Code extensions we will need.

-12. We recommend installing and using Chrome so that you have the same DevTools as others.

- If you don't have Chrome installed yet, you can install it with Chocolatey. To do this, copy the following text, paste it in Hyper and hit return.

+10. We recommend installing and using Chrome so that you have the same DevTools as others.

+ If you don't have Chrome installed yet, you can install it with WinGet. To do this, copy the following text, paste it in Hyper and hit return.

```bash - choco install googlechrome --yes + winget install --id Google.Chrome --exact --source winget --accept-package-agreements --accept-source-agreements ``` - This uses Chocolatey to install Chrome.

-13. Install the following Chrome Extensions: + This uses WinGet to install Chrome.

+11. Install the following Chrome Extensions: - [React Developer tools Chrome Extension](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en) - [Refined GitHub Chrome Extension](https://chrome.google.com/webstore/detail/refined-github/hlepfoohegkhhmjieoechaddaejaokhf?hl=en) - [Socket Security Chrome Extension](https://chrome.google.com/webstore/detail/socket-security/jbcobpbfgkhmjfpjjepkcocalmpkiaop?hl=en) -14. Next we will configure VS Code.

+12. Next we will configure VS Code.

Open VS Code and then press the keys Ctrl-Shift-P. Type in "Settings" and select the item that says `Preferences: Open User Settings (JSON)`:



Once the settings file is open, we will want to add the settings below.

@@ -270,7 +274,7 @@ With those compatibility things out of the way, you're ready to start the system

If you made any further changes to the file, save the file again with `File` -> `Save` in the top menu.

-15. To verify that the VS Code configuration was successful, select `Terminal` -> `New Terminal` in the top menu:

+13. To verify that the VS Code configuration was successful, select `Terminal` -> `New Terminal` in the top menu:



Once the terminal appears, copy the following text, paste it into the terminal and hit return: @@ -289,15 +293,15 @@ With those compatibility things out of the way, you're ready to start the system Check your output carefully - if line 2 (`Shell: ...`) and line 3 (`Terminal: ...`) on your screen aren't exactly the same as the output above, return to the previous step and check if everything was completed fully. -16. We will now install PostgreSQL. Close Hyper and open it again as administrator (like in step 9). +14. We will now install PostgreSQL. Close Hyper and open it again as administrator (like in step 9). Copy the following text, paste it in Hyper and hit return. ```bash - choco install postgresql17 --yes --params '/Password:postgres' + winget install --id PostgreSQL.PostgreSQL --exact --source winget --accept-package-agreements --accept-source-agreements ``` - This will install PostgreSQL and create a default user of `postgres` and a password of `postgres`. Remember this password and use it any time it asks from now on. + This will install PostgreSQL. During the installation, set a default user of `postgres` and a password of `postgres`. Remember this password and use it any time it asks from now on. After the installation is complete, close Hyper and reopen it (just as a normal user - not as an administrator). @@ -408,7 +412,7 @@ With those compatibility things out of the way, you're ready to start the system

-17. We will now install Docker. +15. We will now install Docker. **Option A - Windows 10/11 Pro:** @@ -416,9 +420,8 @@ With those compatibility things out of the way, you're ready to start the system 2. Copy the following text and paste it into Hyper. Hit enter. ```bash - choco install wsl2 --yes - choco install wsl-ubuntu-2004 --yes - choco install docker-desktop --yes + wsl --install --distribution Ubuntu-20.04 + winget install --id Docker.DockerDesktop --exact --source winget --accept-package-agreements --accept-source-agreements ``` 3. Open start menu and search for "Docker Desktop". Run it. This will set up and start Docker.

@@ -432,9 +435,8 @@ With those compatibility things out of the way, you're ready to start the system 3. Copy the following text and paste it into Hyper. Hit enter. ```bash - choco install wsl2 --yes - choco install wsl-ubuntu-2004 --yes - choco install docker-desktop --yes + wsl --install --distribution Ubuntu-20.04 + winget install --id Docker.DockerDesktop --exact --source winget --accept-package-agreements --accept-source-agreements ``` 4. Open the start menu and search for "Ubuntu". Start it - it should ask you to create a user with a password. This will be your user to log in to your Ubuntu Linux Subsystem - note down the username and password somewhere secure to make sure you do not forget it. @@ -449,7 +451,7 @@ With those compatibility things out of the way, you're ready to start the system 1. Close Hyper and open it again as administrator (like in step 9). Copy the following text, paste it in Hyper and hit return. ```bash - Get-ComputerInfo -Property HyperVRequirementVMMonitorModeExtensions,HyperVRequirementVirtualizationFirmwareEnabled | Format-List + powershell.exe -Command "Get-ComputerInfo -Property HyperVRequirementVMMonitorModeExtensions,HyperVRequirementVirtualizationFirmwareEnabled | Format-List" ``` This should display the following output: @@ -468,7 +470,7 @@ With those compatibility things out of the way, you're ready to start the system 6. Find and select the option to save changes and exit the BIOS / UEFI 7. Open Docker Desktop again (as instructed in Option A or Option B) to verify that the error has been resolved -18. Test if Docker is installed by running the following command on the command line: +16. Test if Docker is installed by running the following command on the command line: ```bash docker run hello-world @@ -477,7 +479,7 @@ With those compatibility things out of the way, you're ready to start the system It should print out a welcome message like this:



-19. We will now install EAS CLI for React Native. Search for Hyper in the start menu, then right click on it and choose "Run as Administrator". +17. We will now install EAS CLI for React Native. Search for Hyper in the start menu, then right click on it and choose "Run as Administrator". Copy the following text, paste it in Hyper and hit return. @@ -493,12 +495,12 @@ With those compatibility things out of the way, you're ready to start the system On your phone, go to the app store and install Expo on your phone ([Android](https://play.google.com/store/apps/details?id=host.exp.exponent&hl=en&gl=US), [iOS](https://apps.apple.com/us/app/expo-go/id982107779)). Create an account and log in. -20. Next we will set up some dependencies for Expo and React Native. +18. Next we will set up some dependencies for Expo and React Native. Copy each line in the following text, paste it in Hyper and hit return. ```bash - choco install androidstudio --yes + winget install --id Google.AndroidStudio --exact --source winget --accept-package-agreements --accept-source-agreements echo "export PATH=$HOME/AppData/Local/Android/Sdk/platform-tools:\$PATH" >> ~/.bash_profile source ~/.bash_profile ``` @@ -563,7 +565,7 @@ With those compatibility things out of the way, you're ready to start the system

-21. To verify that Expo is working with the Android Studio virtual device copy and run each of these lines separately in Hyper: +19. To verify that Expo is working with the Android Studio virtual device copy and run each of these lines separately in Hyper: @@ -596,14 +598,14 @@ With those compatibility things out of the way, you're ready to start the system Click on the small `x` at the top right of the virtual device frame to stop the virtual device - this will save a snapshot to make starting the virtual device faster in the future. -22. If you don't have one yet, create a Google account [here](https://accounts.google.com/signup?hl=en). Make a note of the email address associated with this account for usage in later steps. -23. If you don't have one yet, create a GitHub account [here](https://github.com/join). Make sure to set a name. +20. If you don't have one yet, create a Google account [here](https://accounts.google.com/signup?hl=en). Make a note of the email address associated with this account for usage in later steps. +21. If you don't have one yet, create a GitHub account [here](https://github.com/join). Make sure to set a name. If you already have a GitHub account and you haven't set a name on GitHub yet, go to the [GitHub Profile Settings](https://github.com/settings/profile) and add a name:



We will use this name in the next step.

-24. For this step, we'll need to **edit some of the information in the commands** by adding our own information.

+22. For this step, we'll need to **edit some of the information in the commands** by adding our own information.

First of all, we will set our name, which will be the same name as on our GitHub profile:



Copy your name from your profile, **add it in quotes** in the command (replace `Mona Lisa Octocat`) and run the command:

@@ -661,7 +663,7 @@ With those compatibility things out of the way, you're ready to start the system 2. If you want to easily capture screenshots and draw and write on them, try Flameshot: ```bash - choco install flameshot --yes + winget install --id Flameshot.Flameshot --exact --source winget --accept-package-agreements --accept-source-agreements ``` 3. If you need to record mp4 videos of your screen with sound, try out [Loom](https://www.loom.com/). @@ -669,46 +671,43 @@ With those compatibility things out of the way, you're ready to start the system An alternative without the limitations of Loom is Screen to Gif (however, it does not record audio): ```bash - choco install screentogif --yes + winget install --id NickeManarin.ScreenToGif --exact --source winget --accept-package-agreements --accept-source-agreements ``` 4. If you need a clipboard manager to keep a history of things that you have copied, this is an awesome option: ```bash - choco install ditto --yes + winget install --id Ditto.Ditto --exact --source winget --accept-package-agreements --accept-source-agreements ``` 5. To simultaneously test your web design in multiple mobile viewports, try Responsively App: ```bash - choco install responsively --yes + winget install --id ResponsivelyApp.ResponsivelyApp --exact --source winget --accept-package-agreements --accept-source-agreements ``` -6. To remove secrets, large files or other undesirable files from your Git repository, try BFG Repo-Cleaner: - - ```bash - choco install bfg-repo-cleaner --yes - ``` +6. To remove secrets, large files or other undesirable files from your Git repository, try BFG Repo-Cleaner. + Download the `.jar` from the BFG Repo-Cleaner releases and run it using Java. 7. If you're running out of space on your computer, you can use WinDirStat to analyze your hard drive and show a chart of which items are taking up how much space: ```bash - choco install windirstat --yes + winget install --id WinDirStat.WinDirStat --exact --source winget --accept-package-agreements --accept-source-agreements ``` 8. To add [an assortment of new features](https://www.fourth-wall.co.uk/post/powertoys-11-awesome-features-microsoft-won-t-add-to-windows) to Windows such as "pinning" a window to stay on top of all others, quickly renaming or resizing multiple files, splitting your running apps into regions of the screen and more, try Microsoft PowerToys: ```bash - choco install powertoys --yes + winget install --id Microsoft.PowerToys --exact --source winget --accept-package-agreements --accept-source-agreements ``` ## Software Upgrades -Most software upgrades can be performed with `choco upgrade `, but some software upgrades require additional steps: +Most software upgrades can be performed with `winget upgrade --id `, but some software upgrades require additional steps: 1. Node.js with pnpm ```bash - choco upgrade nodejs-lts --yes + winget upgrade --id OpenJS.NodeJS.LTS --exact --source winget --accept-package-agreements --accept-source-agreements corepack disable corepack enable corepack prepare pnpm@latest --activate