This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Recovers Docker Desktop on Windows 11 / WSL2 when the engine is stuck | |
| on "Starting the Docker Engine..." with the VM running but dockerd | |
| unresponsive inside it. | |
| .\Repair-DockerDesktop.ps1 # full run, safe default | |
| .\Repair-DockerDesktop.ps1 -StartFromStage 2 # skip clean restart | |
| .\Repair-DockerDesktop.ps1 -StageTimeoutSec 300 # give each stage 5 min |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Bonjour name ending in .local | |
| scutil --set LocalHostName "My-iMac" | |
| # Friendly name shown in System Preferences > Sharing | |
| scutil --set ComputerName "My-iMac" | |
| # The name recognized by the hostname command | |
| scutil --set HostName "My-iMac" | |
| # Save the computer's serial number in a variable so it can be used in the next command. | |
| serialNum=$(ioreg -l | awk '/IOPlatformSerialNumber/ { split($0, line, "\""); printf("%s\n", line[4]); }') | |
| # Set the NetBIOS name as the serial number |