mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 04:16:29 +00:00
Simplify Windows instructions (#1602)
This commit is contained in:
parent
b92e7e50b6
commit
52e2213c0f
@ -87,27 +87,12 @@ sudo dnf install python3-pip python3-devel python3-virtualenv autoconf openssl-d
|
||||
|
||||
To develop on Windows, you will need to use the Linux subsystem (WSL). Follow the [WSL installation instructions](https://learn.microsoft.com/windows/wsl/install) and install Ubuntu from the Windows Store. Once you're able to access Linux, follow the Linux instructions.
|
||||
|
||||
When working in WSL make sure to keep all code/repos in the WSL environment to avoid issues with file permissions.
|
||||
|
||||
:::tip
|
||||
If you find that you cannot open the development instance via [http://localhost:8123](http://localhost:8123) when using WSL, instead, within a WSL terminal, find the `inet` address of the `eth0` adaptor by running `ip addr show eth0`. Then use this address, excluding the CIDR block, to access the development instance, i.e. if your `inet` is listed as `172.20.37.6/20`, use [http://172.20.37.6:8123](http://172.20.37.6:8123).
|
||||
:::
|
||||
|
||||
#### Freshly installed WSL distribution
|
||||
|
||||
The first time a WSL distribution is started, and the default WSL user account is created, the Windows drives will still be mounted with all files owned by `root:root` instead of owned by the default user, i.e. with `uid=0,gid=0` included in the mount options as shown by:
|
||||
|
||||
```bash
|
||||
user@DESKTOP:/mnt/c/Users/user$ mount | grep mnt
|
||||
C:\ on /mnt/c type drvfs (rw,noatime,uid=0,gid=0,case=off)
|
||||
```
|
||||
|
||||
This will cause the `setup` script to fail with an unrelated error if the local repository is on a Windows drive. To recover, WSL must be restarted after which the Windows drives will be mounted with all files owned by the default WSL user. This can be accomplished by simply restarting the computer, or by issuing the following command from a windows command prompt:
|
||||
|
||||
```bash
|
||||
wsl --shutdown
|
||||
```
|
||||
|
||||
After WSL is restarted, the mount's uid and gid will match the default user.
|
||||
|
||||
### Developing on macOS
|
||||
|
||||
Install [Homebrew](https://brew.sh/), then use that to install the dependencies:
|
||||
|
Loading…
x
Reference in New Issue
Block a user