#HAOS Home Assistant [[HA]] Operating System [[OS]]
# References
[HAOS - GitHub](https://github.com/home-assistant/operating-system)
[HAOS Supported Hardware - GitHub](https://github.com/home-assistant/operating-system/blob/dev/Documentation/boards/README.md)
[HAOS Install x86-64 - Website](https://www.home-assistant.io/installation/generic-x86-64)
[HAOS Install Linux - Website](https://www.home-assistant.io/installation/linux)
[HAOS Developer Docs - Website](https://developers.home-assistant.io/docs/operating-system/)
###### [HAOS Downloads/Releases - GitHub](https://github.com/home-assistant/operating-system/releases)
Find your target *version* and then navigate to *assets* to download the version you require:
- For [[BM]] x86-64 images check `haos_generic-x86-64-____`
- For [[KVM]] images check `haos_ova-____.qcow2.____`
# [[HA]] Console Commands
<code class="g-code">help</code> list all available [[HA]] commands (the commands are pertinent to [[HA]] not the [[OS]])
> [!cmd]- <code class="g-code">help</code>
> ![[haos-ha-0.png]]
>
> <code class="g-code">[command] --help</code> e.g. <code class="g-code">core --help</code> - list only the most common uses of the `[command]`
> <code class="g-code">[command] --help all</code> e.g. <code class="g-code">core --help all</code> - full list of all `[command]` options
<code class="g-code">login</code> enter the [[OS]] shell environment; any command you run inside the shell is related to the [[OS]] not [[HA]]; you can use any [[GNU]]/[[Linux]] command
<code class="g-code">exit</code> exit the [[OS]] shell environment and return to the [[HA]] environment;
> [!cmd]- <code class="g-code">login</code> / <code class="g-code">exit</code>
> ![[haos-hs-login-0.png]]
> [!cmd]- <code class="g-code">cd /mnt/data/supervisor</code> - all [[HA]] configuration structure lives under this directory tree (e.g. `/addons`, `/backup`, `/homeassistant`, `/media`, `/mounts`, `/share`, `json` files, etc)
> ![[haos-cd-0.png]]
> [!cmd]- <code class="g-code">cd /mnt/data/supervisor/homeassistant</code> - all [[HA]]-core configuration structure lives under this directory tree (`/.storage`, `/www`, `configuration.yaml`, other `yaml` files, etc)
> ![[haos-cd-1.png]]
> [!cmd]- <code class="g-code">cd /mnt/data/supervisor/homeassistant/.storage</code> - anything pertaining to [[HA]] security configuration is stored here
> ![[haos-cd-2.png]]
# Network Commands
[HAOS NetworkManager Configuration](https://github.com/home-assistant/operating-system/blob/dev/Documentation/network.md)
> [!cmd]- <code class="g-code">ha dns</code> - display [[DNS]] command syntax
>
> ![[haos-ha-dns-0.png]]
> ![[Pasted image 20231025051355.png]]
>
> [!cmd]- <code class="g-code">ha dns logs</code> - show [[DNS]] logs
> [!cmd]- <code class="g-code">ha dns info</code> - show [[DNS]] configuration
> show [[DNS]] info
>
> ![[haos-ha-dns-1.png]]
> [!cmd]- <code class="g-code">ha dns options --servers dns://8.8.8.8 --servers dns://1.1.1.1</code> - set upstream [[DNS]] servers
> [!cmd]- <code class="g-code">ha net</code> - display *network* command syntax
> ![[haos-net-0.png]]
> [!cmd]- <code class="g-code">ha net info</code> - show *network* configuration
> ![[haos-net-1.png]]
> [!cmd]- <code class="g-code">ha net update -h</code> - display *network configuration* command syntax
> ![[haos-net-2.png]]
> [!cmd]- <code class="g-code">ha net update enp6s18 --ipv4-address 192.168.0.230/24 --ipv4-gateway 192.168.0.1 --ipv4-method static --ipv4-nameserver 192.168.0.248</code> - [[Ethernet]] (wired) [[NI]] example how to configure static [[IPv4]]
> **use `ha net info` to find out the [[NI]] name**
>
> ![[haos-net-3.png]]
>
> **use `net update` to configure the [[IPv4]] information only; check changes with `ha net info`**
>
> ![[haos-net-4.png]]
> [!cmd]- <code class="g-code"><code class="g-code">netstat | grep tcp | more</code></code> - display active TCP connections, ports on which the host is listening (if you do not see :8123 your [[HAOS]] instance has communication issues, unless you changed the primary listening port in `configuration.yaml`); it could take a bit of time for this command to return results
> ![[haos-netstat-0.png]]
> [!cmd]- <code class="g-code">arp -v</code> - display all discovered hosts using hostname - displays the [[ARP]] cache / `(incomplete)` entries do not resolve, meaning host is unavailable
> ![[haos-arp-0.png]]
> [!cmd]- <code class="g-code">arp -n</code> - display all discovered hosts using [[IPv4]] address - displays the [[ARP]] cache / `(incomplete)` entries do not resolve, meaning host is unavailable
> ![[haos-arp-1.png]]
> [!cmd]- <code class="g-code">ip a</code> - display [[NI]] configuration
> ![[haos-ip-0.png]]
> [!cmd]- <code class="g-code">ifconfig</code> - display [[NI]] configuration
> ![[haos-ifconfig-0.png]]
<code class="g-code">nmcli</code> is an interactive network manager, capable of detailed [[NI]] configuration
> [!cmd]- <code class="g-code">nmcli</code> - display [[NI]] overview
> ![[haos-nmcli-0.png]]
> [!cmd]- <code class="g-code">nmcli device show</code> - display detailed [[NI]] configuration
> ![[haos-nmcll-1.png]]
> [!cmd]- <code class="g-code">iptables -S</code> - display firewall configuration
> ![[haos-iptables-0.png]]
# Storage Commands
> [!cmd]- <code class="g-code">du / -h -d 1</code> - display root directory tree storage usage (control directory depth: `-d x`)
> ![[haos-nmcll-1.png]]