{"id":50565739,"url":"https://github.com/webstean/setup","last_synced_at":"2026-06-04T14:30:44.379Z","repository":{"id":157376087,"uuid":"629447884","full_name":"webstean/setup","owner":"webstean","description":"Various Linux Development/Admin setup scripts","archived":false,"fork":false,"pushed_at":"2026-06-01T00:59:14.000Z","size":64532,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-01T02:18:51.667Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webstean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-18T10:34:04.000Z","updated_at":"2026-06-01T00:59:18.000Z","dependencies_parsed_at":"2026-05-19T08:02:41.617Z","dependency_job_id":null,"html_url":"https://github.com/webstean/setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webstean/setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webstean%2Fsetup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webstean%2Fsetup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webstean%2Fsetup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webstean%2Fsetup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webstean","download_url":"https://codeload.github.com/webstean/setup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webstean%2Fsetup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33910136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-04T14:30:43.690Z","updated_at":"2026-06-04T14:30:44.374Z","avatar_url":"https://github.com/webstean.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# setup\n\n**Various setup scripts**\n\n## Windows Subsystem for Linux (WSL) setup - for development, DevOps etc....\n\n![F-Droid (including pre-releases)](https://img.shields.io/f-droid/v/:appId)\n\n![Visual Studio App Center Releases](https://img.shields.io/visual-studio-app-center/releases/version/:owner/:app/:token)\n\nInitial Setup\n```cmd\n## Recommended\n# winget install LIGHTNINGUK.ImgBurn\n# winget install Microsoft.VisualStudioCode\n# Must haves\nwinget install powershell\nwinget install git.git\n```\n\nSet the WSLENV Variable, so these variables will be passed into WSL\n```powershell\n### Powershell\n\n#### Get UPN\n$getupn = @(whoami /upn)\n#### Permanently set UPN user variables\nif ( -not ([string]::IsNullOrWhiteSpace($getupn))) { [Environment]::SetEnvironmentVariable('UPN',\"$getupn\",'User') }\n\n#### Set Strong Password variable\nif ( [string]::IsNullOrWhiteSpace($env:STRONGPASSWORD)) {\n    Write-Host \"Generating Random Password...\"\n    ## All uppercase and lowercase letters, all numbers and some special characters.\n    $charlist = [char]94..[char]126 + [char]65..[char]90 +  [char]47..[char]57\n    $randompwd = @()\n    ## Use a FOR loop to pick a character from the list one time for each count of the password length\n    For ($i = 0; $i -lt 24; $i++) {\n        $randompwd += $charList | Get-Random\n    }\n    ## Join all the individual characters together into one string using the -JOIN operator\n    $randompwd = -join $randompwd\n    [Environment]::SetEnvironmentVariable('STRONGPASSWORD',\"$randompwd\",'User')\n    $env:STRONGPASSWORD = [System.Environment]::GetEnvironmentVariable(\"STRONGPASSWORD\",\"User\")\n}\n \n## info: https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows/\n## Corporate Environments\n[Environment]::SetEnvironmentVariable('WSLENV','OneDriveCommercial/p:STRONGPASSWORD:USERDNSDOMAIN:USERDOMAIN:USERNAME:UPN','User')\n\n```\n\nInstall WSL (with no distribution)\n```powershell\n### Install VM Platform feature\nEnable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart\n### Setup WSL\nwsl.exe --update # to update - which will also update from the store including the kernel and would update from in-windows to the store version\nwsl.exe --list --online\nwsl.exe --install --no-launch  ## - no default distribution\nwsl.exe --set-default-version 2\nwsl.exe --status\n\n```\nInfo: https://wsl.dev/mobyrhel8/\n\nTo get Fedora (RHEL like), you need a separate download via:-\nhttps://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/releases\nThis has to be sideloaded, which typically requires Developer Mode (and local administrator) but can be performed with the following commands:-\n```powershell\n## Powershell\n$repo = \"WhitewaterFoundry/Fedora-Remix-for-WSL\"\n$api = \"https://api.github.com/repos/\" + $repo + \"/releases/latest\"\n$Response = Invoke-RestMethod -Method Get -Uri $api\n## Find the latest release\n$tag = $Response.tag_name\n$file = \"Fedora-Remix-for-WSL-SL_\" + $tag + \".0_x64_arm64.msixbundle\"\n$download = \"https://github.com/\" + $repo + \"/releases/download/\" + $tag + \"/\" +$file\nWrite-Host \"Trying to download $download\"\nInvoke-WebRequest $download -OutFile $file\nImport-Module Appx -UseWindowsPowerShell -Force\nAdd-AppxPackage -Path $file\n$DistroName = 'fedoraremix'\nStart-Process -Wait -FilePath \"${env:USERPROFILE}\\AppData\\Local\\Microsoft\\WindowsApps\\${DistroName}.exe\" \"install --root\"\nwsl --set-default ${DistroName}\n## Custom with sensible settings\n$wslinitalsetup = Invoke-WebRequest -uri https://raw.githubusercontent.com/webstean/setup/main/wsl/wslfirstsetup.sh | Select-Object -ExpandProperty content\n$wslinitalsetup | wsl --user root --distribution ${DistroName} --\nwsl --terminate ${DistroName}\nwsl --manage ${DistroName} --set-sparse\nwsl --set-default ${DistroName}\n\n```\n\nTo use a standard, set the DistroName variable to the distribution you want to install \n```powershell\n## Powershell\n$DistroName = 'Ubuntu'\nwsl --install ${DistroName} --no-launch \n## Run install with no prompt - run as root\nStart-Process -Wait -FilePath \"${env:USERPROFILE}\\AppData\\Local\\Microsoft\\WindowsApps\\${DistroName}.exe\" \"install --root\"\n$wslinitalsetup = Invoke-WebRequest -uri https://raw.githubusercontent.com/webstean/setup/main/wsl/wslfirstsetup.sh | Select-Object -ExpandProperty content\n$wslinitalsetup | wsl --user root --distribution ${DistroName} --\nwsl --set-default ${DistroName}\n## restart, so systemd get enabled \nwsl --terminate ${DistroName}\nwsl --manage ${DistroName} --set-sparse true\n\n```\n\nInstall Microsoft Repo, mssql-tools, azure-functions core, msopenjdk, powershell, /etc/wsl.conf, Xwindows, systat, Azure CLI, Oracle Instant Client (if x86-64), Golang, maven, node via nvm, oh-my-posh\n\n```powershell\n## Powershell\n$DistroName = 'Ubuntu'\n$wslsetuppre = Invoke-WebRequest -uri https://raw.githubusercontent.com/webstean/setup/main/wsl/wslsetup-pre.sh | Select-Object -ExpandProperty content\n$wslsetup1   = Invoke-WebRequest -uri https://raw.githubusercontent.com/webstean/setup/main/wsl/wslsetup1.sh | Select-Object -ExpandProperty content\n$wslsetup2   = Invoke-WebRequest -uri https://raw.githubusercontent.com/webstean/setup/main/wsl/wslsetup2.sh | Select-Object -ExpandProperty content\n$wslsetuppre + $wslsetup1 | wsl --user root --distribution ${DistroName} --\nwsl --terminate ${DistroName}\n$wslsetuppre + $wslsetup2 | wsl --user root --distribution ${DistroName} --\n\n```\n\nTo delete and start again\n\n\u003e **Warning**\n\u003e This will delete the root filesystem of the Linux distribution\n\n```powershell\n## Powershell\n$DistroName = 'Ubuntu'\nwsl --terminate ${DistroName}\n## size of disk\n(Get-ChildItem -Path HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Lxss | Where-Object { $_.GetValue(\"DistributionName\") -eq '${DistroName}' }).GetValue(\"BasePath\") + \"\\ext4.vhdx\"\nwsl --list\n## Now unregister the distribution - which deletes the root filesystem\nwsl --unregister ${DistroName}\n\n```\n\n## Setup for Raspberry Pi\n\nGreat device - quick setup\n\n```shell\n## bash / zsh with curl etc...\ncurl -fsSL https://raw.githubusercontent.com/webstean/setup/main/pi/raspi-setup.sh | bash -\n\n```\n\nor\n\n```shell\n## bash / zsh with wget etc...\nwget https://raw.githubusercontent.com/webstean/setup/main/pi/raspi-setup.sh | bash -\n\n```\n\n## Setup an example development project (baresip)\n\nUnder Linux or WSL\n\n```shell\n## bash / zsh etc...\ncurl -fsSL https://raw.githubusercontent.com/webstean/setup/main/baresip/setup.sh | bash -\n\n```\nor\n\n```shell\n## bash / zsh etc...\nwget https://raw.githubusercontent.com/webstean/setup/main/baresip/setup.sh | bash -\n\n```\n\n## Installing Development Fonts [Windows]\n\nhttps://raw.githubusercontent.com/webstean/setup/main/fonts/font-install.ps1\n\nYou'll need to download the fonts and place them into a \"fonts\" directory, in the same directoy you run this script.\n\n## Create Linux User Accounts\n\n```shell\n## bash / zsh etc...\nNUSER=vscode\nNPASS=vscode\n# quietly add a user without password\nsudo adduser --quiet --gecos \"\" --force-badname --disabled-password --shell /bin/bash ${NUSER}\n\n# set password\necho -e '${NPASS}\\n${NPASS}\\n' | sudo passwd ${NUSER}\n\n```\n\n## Remove Linux User Account\n\n```shell\n## bash / zsh etc...\nNUSER=vscode\nsudo deluser --remove-home ${NUSER}\n\n```\n\n## List of WSL Root Filesystems\n\n\u003e **Infomation**\n\u003e WSL distrubtion are always installed on single user base. It is not supported for multiple users to share the WSL distribution.\n\n```powershell\n## Powershell\n(Get-ChildItem HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Lxss | ForEach-Object {Get-ItemProperty $_.PSPath}) | Select-Object DistributionName, @{n=\"Path\";e={$_.BasePath + \"\\rootfs\"}}\n\n```\n\n## Tell Windows Docker to use WSL Docker\naka: Docker-in-Docker \nThe environment variables in the applicable WSL installation, needs to be:-\n```shell\nexport DOCKER_HOST=tcp://localhost:2375\n\n```\n\n```powershell\nStop-Service *docker*\nWrite-Host \"Setting Docker to allow TCP port 2375\" -ForegroundColor Yellow -BackgroundColor DarkGreen\n$dockerpath = \"$env:APPDATA\\Docker\\settings.json\"\n$settings = Get-Content $dockerpath | ConvertFrom-Json\n$settings.exposeDockerAPIOnTCP2375 = $true\n$settings | ConvertTo-Json | Set-Content $dockerpath\nStart-Service *docker*\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebstean%2Fsetup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebstean%2Fsetup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebstean%2Fsetup/lists"}