shell - hwclock:无法通过任何已知方法访问硬件时钟

标签 shell hwclock

<分区>


我正在使用 Windows 10 提供的 Ubuntu bash shell,我想通过使用 hwclock 查看我的硬件时钟时间,但我不断收到错误。

时钟

root@DESKTOP:/home/blondinl# hwclock
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.

当我使用 --debug 选项时

root@DESKTOP:/home/blondinl# hwclock -- debug
hwclock from util-linux 2.27.1
hwclock: cannot open /dev/rtc: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

我试过使用timedatectl

root@DESKTOP:/home/blondinl# timedatectl
Failed to create bus connection: No such file or directory

我在互联网上搜索了一个答案,但找不到任何答案。 也许是因为我在 Windows 上使用我不知道的 linux bash。 期待您的帮助

最佳答案

这似乎是一个可能尚未修复的 wsl 错误。我今天仍然面对它。

https://github.com/microsoft/WSL/issues/5324

https://github.com/microsoft/WSL/issues/4245

抱歉,我真的没有时间提供额外信息或阅读它,但也许你可以。

关于shell - hwclock:无法通过任何已知方法访问硬件时钟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55672930/

相关文章:

c - 如何以编程方式在 Linux 上设置硬件时钟?

linux - 如何在 Linux 中从命令行读取电子邮件?

linux - 从命令列表中调用 shell 命令,直到所有命令都已完成

linux - 如何在不使用 echo 的情况下更改输出颜色?

linux - 获取文件的内容并搜索 unix 中特定目录中的所有文件中的内容

linux - 如何将 sed 命令组合到 shell 脚本中

linux - 如何自动检查时钟?

unix - 欧洲/伦敦的时区和 BST 问题

linux - 时间设置不正确,date -u 和 hwclock -u 产生不同的结果