WSLにUbuntu 26.04を入れてみたところ、なんかplatform metrics collectionをオプトインするか?と出てきて何も考えずYを応答して有効にしてしまった。やっぱり無効化したいな、と思い調べた。
Help improve Ubuntu! Help us improve Ubuntu features and compatibility by sharing system reports with Canonical. Reports are sent anonymously and do not contain any personal data. For legal details, please visit: https://ubuntu.com/legal/systems-information-notice We will save your answer to Windows and will only ask you once. Would you like to opt-in to platform metrics collection (Y/n)? To see an example of the data collected, enter 'e'. [Y/n/e]: y
ドキュメントによると以下で無効化できるらしい。
ubuntu-insights consent linux wsl_setup ubuntu_release_upgrader --state=false
以上。
…もう少し見てみる。
ubuntu-insightsというリポジトリで管理されている様子。
Ubuntu Reportの代替らしい。そんなのあったんだ。収集するサンプル(?)も載っている。
設定ファイルはユーザ単位で管理している模様。
$ ls ~/.config/ubuntu-insights/*.toml /home/sandbox/.config/ubuntu-insights/linux-consent.toml /home/sandbox/.config/ubuntu-insights/ubuntu_release_upgrader-consent.toml /home/sandbox/.config/ubuntu-insights/wsl_setup-consent.toml
ubuntu-insightsの実行の仕組みにはsystemdのtimerを使っており、--userでユーザ単位で制御している模様。気になるなら以下も無効化してしまってもよいはず。
# 確認 systemctl status --user ubuntu-insights-collect.timer ubuntu-insights-upload.timer ubuntu-insights-collect.service ubuntu-insights-upload.service # timerを停止 systemctl stop --user ubuntu-insights-collect.timer ubuntu-insights-upload.timer
/usr/bin/ubuntu-insights というバイナリがあり、上記のserviceはいずれもこのバイナリのサブコマンドで操作している。collectをdry-runができるので試した。
$ /usr/bin/ubuntu-insights collect --dry-run
{
"insightsVersion": "0.9.3ubuntu",
"collectionTime": 1778067897,
"systemInfo": {
"hardware": {
"cpu": {
"name": "AMD Ryzen 9 7900X3D 12-Core Processor",
"vendor": "AuthenticAMD",
"architecture": "x86_64",
"cpus": 24,
"sockets": 1,
"coresPerSocket": 12,
"threadsPerCore": 2
},
"memory": {
"size": 63852
},
"disks": [
{
"size": 388,
"type": "disk"
},
{
"size": 186,
"type": "disk"
},
{
"size": 16384,
"type": "disk"
},
{
"size": 1048576,
"type": "disk"
}
]
},
"software": {
"os": {
"family": "linux",
"distribution": "Ubuntu",
"version": "26.04"
},
"timezone": "JST",
"language": "C"
},
"platform": {
"wsl": {
"subsystemVersion": 2,
"systemd": "used",
"interop": "enabled",
"version": "2.6.3.0",
"kernelVersion": "6.6.87.2-microsoft-standard-WSL2"
}
}
}
}
飽きたのでおわり。