简体   繁体   English

在 MacOS Mojave 中找不到 ntpdate 命令

[英]ntpdate command not found in MacOS Mojave

I have a Bash script who update the time of my mac but since the update of Mojave the command isn't found:我有一个 Bash 脚本来更新我的 mac 时间,但是由于 Mojave 的更新,找不到命令:

ntpdate -u time.apple.com

return :返回 :

ntpdate: command not found

Where am I going wrong?我哪里错了?

It's a duplicate.这是一个副本。 Please check this stackoverflow question .请检查这个 stackoverflow 问题

TL;DR use sudo sntp -sS time.apple.com instead. TL;DR 使用sudo sntp -sS time.apple.com代替。

对于尝试这样做的任何人,因为他们的虚拟机在尝试在虚拟机上安装 macos 时无法连接到更新服务器,我将我的网络适配器从 NAT 切换到桥接,问题得到了解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM